
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 11:13 PM
Hello all,
I've created a REST message and the test works perfectly when testing from the HTTP methods area. I then click the "Preview script usage" and copy the script to the clipboard. I paste this script in to a Custom Action in Flow Designer and click TEST. The test fails from here, giving the following error:
REST Msg Outbound - RESTMessageClient : Error constructing REST Message/Method: MS Graph/Update User: com.glide.generators.InvalidGlideRecordException: Unable to find REST Message Record with Name: MS Graph: com.glide.rest.outbound.RESTMessageDAO.getRestMessageRecord(RESTMessageDAO.java:97)
Here are a few screenshots showing the script.
Script that doesnt work in custom flow action:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 11:25 PM
Are you using different application scopes for the rest message and flow?
In your rest call, you can try adding the global scope name to the Rest call:
var r = new sn_ws.RESTMessageV2('global.MS Graph', 'Update User');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 11:25 PM
Are you using different application scopes for the rest message and flow?
In your rest call, you can try adding the global scope name to the Rest call:
var r = new sn_ws.RESTMessageV2('global.MS Graph', 'Update User');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2023 05:53 AM
This was the issue. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 11:30 PM
I hope both flow and REST Message are in same scope?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader