- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2025 08:30 PM
- The problem I am trying to solve is to store the following code snippet like "javascript:new AcorioEmailUtils().addToRecipients(current);" to a record using flow designer.
- I can go out to the table and manually store the snippet no problem, but I need to automate it.
- Simply using a "Look Up Record" action then an "Update Record" action choosing the field and entering the code snippet is not storing the code.
- What I do not want to do is execute the code snippet at this time. This code will be executed later as the group members may change over time. I do not want to surround it with '' as I do not want to break existing functionality.
- The code is piped in from a catalog variable, I tried populating it to a flow variable instead.
- The below screen shot shows 3 different methods trying to do the same thing, the only one that writes anything is the Cc line but that has the tick marks I do not wish to include.
I am starting to go down another path to accomplish the same thing by creating a custom action and scripting the action but not sure if that buys me anything more than what I am getting using the update record function....
Inputs:
Script Step:
Suggestions would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 07:40 AM
strange, I didn't get any error but it didn't update the BCC field
It worked for me using GlideRecord update in background script, you can try to create a custom flow action and use Script Step to do that
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 07:20 AM
the inline f(x) script is thinking that it's supposed to make a call to script include but it won't find the current object
what if you store that string in system property and then simply use this
return gs.getProperty('propertyName');
property holds this value -> javascript:new AcorioEmailUtils().addCcRecipients(current);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 07:40 AM
strange, I didn't get any error but it didn't update the BCC field
It worked for me using GlideRecord update in background script, you can try to create a custom flow action and use Script Step to do that
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 08:56 AM
@Ankur Bawiskar Thank you very much for your help! That last solution works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2025 09:41 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader