More re: On_After_Transaction

Because the system sends the "Inquire Complete" message back before it actually finishes refreshing the field values displayed (even if it's only a split second) I encountered another issue. I was using the end date from the new record to calculate a salary percentage to display in another field on my form.

Since I was picking up the end date from the previous record this calculation was wrong (unless the user clicked Inquire again). I tried to figure out how to trick the system to perform a secondary inquire and recalculate before the user noticed.

This worked when clicking Next or Previous but I couldn't use it when Inquire was clicked without going into an endless loop.

I finally figured out that what I needed to do was perform a DME (query) against the same records and get my end date from there instead of relying on the form end date value.

It's an extra step but unless Lawson changes their system to not send the message that the inquire was completed until after the form field values are actually refreshed, it's a workaround I will keep handy.

Design Studio On_After_Transaction

I had a need recently to suppress data a entry field on a form which had records that went beyond the first page. What I tried to do first was to check the conditions for when the field should be suppressed after an inquire (or page down) was done.

The down side was that Lawson sends the "Inquiry Complete" before it actually refreshes the page being displayed so my field was suppressed based upon the previous records and not the ones displayed after the page refresh occurs.

My resolution was to use the On_Before_Transaction function instead. When a Page Down fc=="+" occurs I check the last line of the current data and query the next 5 records. If they meet the criteria then I suppress the fields and then allow the page to refresh.

It's an extra step that I shouldn't have to script for but it works.