RESTMessageV2 does not work from Custom Flow Action

Brian Hofmeiste
Kilo Guru

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:

Friday-002.pngFriday-001.pngFriday-003.png

1 ACCEPTED SOLUTION

Weird
Mega Sage

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');

 

View solution in original post

3 REPLIES 3

Weird
Mega Sage

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');

 

This was the issue.  Thanks!

Ankur Bawiskar
Tera Patron
Tera Patron

@Brian Hofmeiste 

I hope both flow and REST Message are in same scope?

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader