Good morning! I am writing a Restlet for Vendor Bi...
# suitescript
c
Good morning! I am writing a Restlet for Vendor Bill. I'd like to know the approvalstatus of the bill in the beforeSubmit event. But, it seems I can only use the getText method if I load the record dynamically in the afterSubmit. I have the afterSubmit part working.
Copy code
var loadedRecord = record.load({
                    type: record.Type.VENDOR_BILL,
                    id: submittedBill.id,
                    isDynamic: true
                });

                var approvalStatus = loadedRecord.getText({fieldId: 'approvalstatus'});
Is there any way to know the approvalstatus in the beforeSubmit?