fmphysio Posted December 18, 2009 Posted December 18, 2009 I have a script to get some values upon loading a Record. However, within the script are a few Find()commands. Is there a way to stop the trigger from going when ever the script finds a record? I just want it to load a record, run the script, find the records grab the values required and come back to the original record. Currently instead it loads a record, runs the script, finds a record, runs the script again, etc... Thanks B)
Vaughan Posted December 18, 2009 Posted December 18, 2009 You haven't really told us much about the problem, however it might be worth trying to use a relationship to get the values rather than Find steps. Alternatively, when the record is first loaded and the script first runs, set the record id into a global variable. Then get the script to check the variable to see if it's already been processed.
fmphysio Posted December 18, 2009 Author Posted December 18, 2009 Thanks Vaughan, I've been there and tried that.. and relationships just don't seem to cut it for what I need to do. I've managed to get around this problem of an infinite loop by enclosing the script inside an If statement, where are particular global variable ($$AllowFamilySetup = ""). Then just before the script does it's finding, i.e. switching records, I tell it to change $$AllowFamilySetup = "No". Then at the end of the script I reset $$AllowFamilySetup = "". This doesn't stop the script from triggering everytime, but does stop the script from executing the finds before it's had a chance to finish what it started.
Recommended Posts
This topic is 5728 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