Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, November 27, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Date Functions in Legacy Script
Chris Fleetwood
Posts: 35
 
Date Functions in Legacy ScriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Venu Gopal Ragu
Posts: 11
 
Re: Date Functions in Legacy ScriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 3:18 AM
fiogf49gjkf0d
hi Chris

the syntex for "Application.BasicFunctions.CurrentUserID" in legecy is -CurrentUserID and for Date use Now()... try this

all the best.
[Reply][Quote]
Chris Fleetwood
Posts: 35
 
Re: Date Functions in Legacy ScriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 10:05 AM
fiogf49gjkf0d
That worked....Many thanks!
[Reply][Quote]
Lloy Sanders
Posts: 69
 
Re: Date Functions in Legacy ScriptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 07 10:09 AM
fiogf49gjkf0d
If you have remote users, you will want to use Application.BasicFunctions.DateToISO(Now) for the date so it will sync out to the remote users.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/27/2024 6:36:20 AM