|
Date Functions in Legacy Script
Posted: 05 Mar 07 10:04 AM
|
fiogf49gjkf0d I need to add a couple of lines to a Legacy script plugin to store MODIFYUSER and MODIFYDATE.
I am currently working in Saleslogix version 6.2.3 and my experience with the scripting environment revolves around Active/Basic Script. If the plugin I am trying to change was a Active Script plugin, then I would have no issues.
Here's a snippet of the code:
DBSetValue uhandle,"Address1",GetPropertyOf("adAddress1","Text") 'DNL DBSetValue uhandle,"Address2",GetPropertyOf("adAddress2","Text") 'DNL DBSetValue uhandle,"Address3",GetPropertyOf("adAddress3","Text") 'DNL DBSetValue uhandle,"Address4",GetPropertyOf("adAddress4","Text") 'DNL DBSetValue uhandle,"City",GetPropertyOf("adCity","Text") 'DNL DBSetValue uhandle,"State",GetPropertyOf("adState","Text") 'DNL DBSetValue uhandle,"PostalCode",GetPropertyOf("adPostal","Text") 'DNL DBSetValue uhandle,"Country",GetPropertyOf("adCountry","Text") 'DNL DBSetValue uhandle,"ModifyUser",CurrentUserid 'GKN001 DBSetValue uhandle,"ModifyDate",Now 'GKN001
'GKN001 <<<<<
The lines marked with "<<<<<" were my attempt to add the two fields, MODIFYUSER and MODIFYDATE. Of course, when I tried to run the script, the update didn't occur (undoubtedly, because of the resulting syntax errors).
My question is, what is the equivalent of the VBScript DATE() or Today function in Legacy Script? I tried Now, Today, and Date(), but none of these seem to work. Also, what is the counterpart of the Application.BasicFunctions.CurrentUserID function in Legacy Script (if one indeed does exist)?
I don't want to rewrite the Legacy Script at this point (it's not worth the time involved and I have more pressing projects in the pipeline), I just want to ensure that on an update to the ADDRESS table, that MODIFYUSER and MODIFYDATE are updated as well.
Thanks in advance for any insights and/or information from anyone involved.
Chris Fleetwood |
|
|