Procedure to copy warranty information

Version: 9.5
Description: Creating a procedure to copy the columns "System Purchase Date" and "System Warranty Expire Date" to 2 custom columns
Instructions: I am trying to create a procedure that will copy the 2 fields mentioned above, and paste them into 2 custom fields via a procedure, however looking at the below link, i am unable to find these fields referenced, and after some playing around using vSystemInfoManual/[System Purchase Date] and vSystemInfoManual/systemPurchaseDate im unable to get it to pull the data via getVariable(SQL View).
Has anyone managed to do this in the past, or know how we can do it?
The reason for this is so we can use MSP Assist to sync warranty information into our PSA as MSP Assist can only map to custom fields.
Cheers
Comments
-
So, you need to get into your Database Views to get the variable you're looking for.
SYSTEM > DataBase Views
This may help you figure out how to view your database views. I don't have the Permissions in my company to view these.
You can run SQLread() to get the info you're looking for, but I don't have the permissions to do those and thus I cannot provide an example of that working correctly.
Alternatively,I tried using these Values I found using inspect on the AUDIT> View Individual Data > System info > Edit System Info and on the Agent > view agent > quickconnect hover > first column set:
vSystemInfo/syspurchasedate
vSystemInfo/syswarrantyexpiredate
vSystemInfoManual/syspurchasedate
vSystemInfoManual/syswarrantyexpiredate
vSystemInfo/[System Purchase]
vSystemInfo/[Warranty Expire]
vSystemInfoManual/[System Purchase]
vSystemInfoManual/[Warranty Expire]
All resulted in Malformed SQL queries.
These values are represented differently here though:
Showing that they are used as variables like this as well:
#vSystemInfo.syspurchasedate#
#vSystemInfo.syswarrantyexpiredate#
I tried to confirm this method, but instead of returning values the way #vMachine.SysSerialNumber# does, it instead returns the following (see bold and italicized line):
10:22:41 am 14-Sep-23
change Asset Tag
Success THEN
USER
10:22:41 am 14-Sep-23
change Asset Tag-0004
Comment at THEN step 3
USER
10:22:41 am 14-Sep-23
Write text to file
Success THEN
USER
10:22:39 am 14-Sep-23
change Asset Tag
Comment at THEN step 3
USER
10:22:16 am 14-Sep-23
Run Now - change Asset Tag
Admin USER scheduled procedure Run Now - change Asset Tag to run at Sep 14 2023 2:22PM
USER
0