I have an After Submit - User Event script that is...
# suitescript
m
I have an After Submit - User Event script that is loading Item Fulfillment records upon edit. I want to compare the shipping cost between the IF and the sales order it was created by. Is there a way to ensure that I ignore item fulfillments created by other transaction types?
r
i guess you when you load the record , you see the 'created from' field and if 'created from' exist ... lookupfield on salesorcer for shipping cost and compare it with the IF shipping cost..
n
@Micah You could perform a lookup using the createdfrom field to see what the recordtype returned is:
Copy code
var tranLookup = nlapiLookupField('transaction',createdfrom,['recordtype']);
var isSO = (tranLookup.recordtype === 'salesorder');
(note createdfrom is the value of the createdfrom field)
m
I'll give this a try...thanks!
This worked perfectly...thanks!