I'll just have to do record.load then?
# suitescript
k
I'll just have to do record.load then?
k
Client scripts only execute in edit mode. If you have a deployed client script with a pageInit entry point, that script does not execute when you view the form. It executes when you click Edit.
k
ah ok, but the button does stuff when I click it, it just doesn't find the item sublist
I don't actually need to edit the record, just need to run a search for fulfillments matching the same orderdoc and orderline fields for each item line
Now that I think of it a suitelet is going to be better for this anyway
k
Button Means, using UserEvent script or form action buttons ?
You can use UE script and CLientScript in order do your logic
k
Sorry, had to run some errands. The button is generated by a Cash Sale UE script, and when clicked launches a new browser window with a suitelet that prints a PDF template populated with the Item Fulfillment record. The trouble is the only thing connecting the cash sale lines with the item fulfillment lines seems to be the
orderline
and
orderdoc
columns. I was using currentRecord.get.promise on the cash sale client script to do a search for the matching item fulfillment to figure out which IF to use to populate the PDF template, but can't use a client script that way to get the cash sale line items, so it's easier to do a record.load on the suitelet end and do the search from there