How do you differenciate a record that is loaded u...
# suitescript
i
How do you differenciate a record that is loaded using
nlapiLoadRecord
and one that is through
UI
? I have an
userevent
that attach a
script
to the
PO
form. On the
beforeLoad
I add some buttons and attach the script, then in the attached script, there are some functions that fire the buttons, this functions load the record, set some values and submit the record ex.
var rec=nlapiLoadRecord(nlapiGetRecordType(),nlapiGetRecordId());
and
nlapiSubmitRecord(rec);
, the
userevent
has a
beforeSubmit
and
afterSubmit
so if Im not mistaken these functions run when either the user clicks the buttons firing the
load
and
submit
functions in the attached script and also when the user edits the
PO
record, right?