Newbies Melcher Posted August 19, 2003 Newbies Posted August 19, 2003 I have an invoice database, and when an invoices balance reaches zero or less, the sales rep who owns that invoice receives their commission. In order for me to track the date when Sales Reps earn their commission on each invoice, after a payment is posted against an invoice, if the new balance is <= 0, then the current date is recorded within it. The Balance is a calculated field, and the date is a simple date field. I have an add payment script, which adds a new payment, calculates the new total payments sum, records it, and then sets the 'CommissionEarnedDate' field to the current date depending on the new balance. The problem is that it does not seem like the balance calculation field is updating properly before the script tests to see if the balance is <= 0. But if I run the script to set the 'CommissionEarnedDate' field manually, it works correctly. Why isn't the Balance calculation not updating untill all scripts have finished running. Is there a way to force this calculation to be evaluated during the script so that the date can be set properly. Thanks
Mike D. Posted August 19, 2003 Posted August 19, 2003 Add the step Go To Field [ ] to your script. Do not put a field name into the step, just leave the brackets empty. This forces the record to be saved. Put the step at an appropriate point in your script to update the Balance calculation before testing to see if the balance is <= 0. HTH, Mike
MoonShadow Posted May 19, 2004 Posted May 19, 2004 Add the step Go To Field [ ] Depending upon your version (you didn't indicate), you can use Exit Record/Request. That's what it is there for.
Recommended Posts
This topic is 7496 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