Help please! I am working with the Order Summary screen. This screen is made up of data from the Orders table and data from the OrderItems table.
I need to create a table level script that will update data on the Order table when a user clicks a workflow button confirming data that is in the OrderItems table.
Table level scripts seem to be my nemesis lately. I had this one working previously. However, I had to add an if statement to it as it was trying to run when an Order was created (even though I had it in the Update statement?)
The table level script is located on the OrderItems table. However, I want to look at a field on the Order table. This field is on the OrdersSummary screen.
My table level script is not working after adding an if statement to it, therefore, I was going to check what was being returned as my "true" for the if statement. On the order summary screen, there is a field named orde_locationconfirmed. I want the TLS to fire if this field has a "Y" in it. (The Y gets populated when a user clicks the "Location Confirmed" workflow button.
I went to the Order Summary screen and added this to the first fields Create script field.
var LocationConfirmed = FormValues("orde_locationconfirmed");
ErrorStr += "Location Confirmed = " + LocationConfirmed + ". ";
I get ....
Location Confirmed = .
If I change that to
var LocationConfirmed = Values("orde_locationconfirmed");
ErrorStr += "Location Confirmed = " + LocationConfirmed + ". ";
I get ....
Location Confirmed = Y.
I am confused as to why I am not getting a value when using FormValues(). My understanding was that this could be used to get any value on the screen even regardless of the screen block you put it in.
Is this not correct?
As always, any assistance is greatly appreciated!