What the? I'm running this in a Suitelet. I'm no...
# suitescript
d
What the? I'm running this in a Suitelet. I'm not sure why I'd get nulls for
scriptId
and
deploymentId
s
Maybe its because you are outside an entry point?
b
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
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
Really @michoel, how so?
m
Copy code
const curRecord = currentRecord.get();
const scriptId = curRecord.getValue({ fieldId: "script" });
const deploymentId = curRecord.getValue({ fieldId: "deploy" });
👌 1