Hi all! I'm seeing a strange behavior. For the inv...
# suitescript
d
Hi all! I'm seeing a strange behavior. For the invoice, if I send it using this button:
I never see that beforeLoad() event occurs for the Invoice record. Why it can be? I thought that the invoice data being loaded from the DB in this case anyway.
b
user event scripts arent nearly as universal as you think they are
😧 1
y
@battk can you provide a little bit more explanation?
b
not everything triggers user event scripts
user event scripts are triggered for specific things
like editing a record
y
@battk according to documentation, beforeLoad
Defines the function that is executed before a record is loaded; that is, whenever a read operation occurs on a record, and prior to returning the record or page.
These operations include navigating to a record in the UI, reading a record in SOAP web services, and loading a record.
If I understand it right, actions like reading from database are covered of this scriptcontext.
b
those specific things are covered
dont generalize it to all database reads
y
@battk thanks. Just to clarify: Is in the definition above the phrase ā€œloading a recordā€ not equal to ā€œreading from databaseā€?
b
literally record.load