https://netsuiteprofessionals.com logo
d

darrenhillconsulting

03/23/2022, 1:34 PM
What the? I'm running this in a Suitelet. I'm not sure why I'd get nulls for
scriptId
and
deploymentId
s

Sandii

03/23/2022, 2:20 PM
Maybe its because you are outside an entry point?
b

battk

03/23/2022, 2:29 PM
the suitelet is the code that runs serverside
your code is running on the output of the suitelet
this is also a divergence between ss1 and ss2
in ss1, there is an actual client script record that is used by the form, so there is a script id to get
m

michoel

03/24/2022, 12:51 AM
I haven't seen this documented but you can get the suitelet script and deploy ids from the current record in an attached client script.
d

darrenhillconsulting

03/24/2022, 1:36 PM
Really @michoel, how so?
m

michoel

03/24/2022, 10:12 PM
Copy code
const curRecord = currentRecord.get();
const scriptId = curRecord.getValue({ fieldId: "script" });
const deploymentId = curRecord.getValue({ fieldId: "deploy" });
👌 1