I'm needing to be able to generate GUID's in NetSuite programmatically. It seems like the only ways to generate a GUID is with either the addCredentialField() form field or the addSecretKeyField() form field from the N/ui/serverWidget module. Since I need to have a GUID created everytime a custom record is created, I'm trying to figure out how to call a Suitelet from server script (say a user event script or map/reduce script), pass a parameter to it, set the addSecretKey field on the form to be defaulted as the parameter value, and then submit the form programmatically to generate the GUID (then create a custom record to then store the GUID).
I'm running into a roadblock, though, trying to figure out how to submit the Suitelet form from a script/without doing so manually for each record I'm needing a GUID for.
Does anyone have any thoughts on how I can do this? Or if what I'm wanting to do is even possible (newbie with web development).
Thanks!!