- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2024 02:39 PM - edited ‎12-31-2024 02:47 PM
Xanadu
I have script that is called in the Service Catalog Item Workflow post approval. It is trivial
When I print the payload using gs.log(JSON.stringify(payload),"RITM Debug"); External Catalog ID is null.
But, if I print just the value gs.log("External Catalog ID" + grCatItem.u_external_catalog_id,"RITM Debug");
the value is logged.
What am I doing wrong?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-31-2024 03:49 PM
Can you try below and print? That would convert the id to a string.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-01-2025 12:52 PM - edited ‎01-01-2025 01:02 PM
Hello all,
Thank you for you suggestions. I tried all of them and wanted to report back
1. I couldn't append a double quote because that would mean altering the value of the attribute
2. I used the getvalue approach suggested by @Sandeep Rajput
3. I also. tried the current.cat_item... approach suggested by @Ankur Bawiskar
Approach (2) and (3) returned a value but that worked only when string concatenation was done.
In both approaches, I had to append toString() to get the payload to be constructed correctly. I don't know the technical rationale. I found this out by trial and error.
Follow up to above: I tried @SanjivMeher suggestion of appending "" (double quotes without a space) and that worked. It seems to have the same effect as toString()