Matt Leach Posted November 9, 2009 Posted November 9, 2009 Is there a way to have the OnRecordCommit script trigger run only once? What i am trying to accomplish is when a new record is added, i would like to copy the phone number field to the PID field and the name field to the SID field. I was planning on using the OnRecordCommit script trigger but i only want this script to happen when the record is created, not everytime a save is changed. If someone where to change the name or the phone number of the record, i dont want it to update the PID or SID. Is there a way to have this script run ONLY when a new record is created? Thanks
XJoe Posted November 9, 2009 Posted November 9, 2009 Just use a if then test to see if the field is empty or not. If it's empty the copy the field, and if not empty then don't copy the field. Hope this helps
Matt Leach Posted November 9, 2009 Author Posted November 9, 2009 I knew it had to be something simple, guess i havent had enough coffee yet this morning. Thanks!
kaostika Posted December 17, 2009 Posted December 17, 2009 You can probably use get(Openrecordstate) and check to see if it is a new record.
Recommended Posts
This topic is 5729 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now