<@UFAHSLYJ1> You don't have access to the record I...
# suitescript
a
@Craig You don't have access to the record ID on
creation
in a GL plugin; you need to figure out another way, what are you trying to do, and why do you need the ID?
c
@alien4u If you set the script to run asynchronously then you can access the id
I need to ID of the record so I can do a search for fields on the record and do some joins with another record to get all the data I need to calculate the GL impact based on a set of financial rules.
a
You can read the values you need from the record itself and then create a search to get the info you need from the other/related records.
Your GL plugin has access to the record being created and you can read all values as normal with getValue.
Untitled
c
when I log oRec it's blank.
Running async has no downside and gives access to the record ID - if that didn't work I'd look into why the record appears to be empty.