Question on using setNewGuid() on scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 07:29 AM
Hi ,
I have a workflow which will create a catalog task , so in the advanced section of the catalog task activity i have scripted this way :
workflow.scratchpad.sys_id= task.setNewGuidValue();
Dont know why i am getting the sysid as undefined and workflow goes crazy post that.
If i use workflow.scratchpad.sys_id= task.setNewGuidValue(String value);
it shows me an error in this particular line .
Can someone say how to use this in scoped app.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 08:52 AM
I've never had much success with setNewGuidValue() in a scoped app; seems like it is intended more to allow you to set an externally generated sys_id than it is to allow you to record the ID of a record.
For catalog tasks, the only work-around I've come upon would be do something like this at the end of your catalog task script:
workflow.scratchpad.sys_id = task.insert();
That creates the record and stores the sys_id as the script completes.
I hope this helps!
If this was helpful or correct, please be kind and remember to click appropriately!
Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!