nathanw
12/20/2019, 6:00 PMgetValue on the Sales Order Record
2. Call getText on Created From Field and parse out the Document Id
Option 2 seems a lot more efficient but potential for mistakes, Option 1 seems terrible inefficient but a sure value.suitedev
12/20/2019, 6:03 PMsearch.lookupFields() to get the tranId and type, to ensure the 'createdfrom' is actually a sales order -- unless you always know it's a sales order.nathanw
12/20/2019, 6:05 PMsuitedev
12/20/2019, 6:05 PMsuitedev
12/20/2019, 6:06 PMgetText on the field, but if they ever change the name of 'Sales Order' to something else, you would have to update the script.alien4u
12/20/2019, 6:18 PMsearch.lookupFields() , if you are worry about the Type you can use record.Type.TRANSACTION and then get the tranid .ec
12/20/2019, 7:37 PMsearch.Type.TRANSACTION, but I agree otherwise!suitedev
12/20/2019, 8:26 PMsuitedev
12/20/2019, 8:26 PM'transaction'