- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2016 11:36 AM
Hi All,
I have an Outbound REST message to post. I have created it within the scoped application and i have table in the same scope. I am trying to run a business rule script to run this REST Message whenever there is a record inserted. Am setting the body in a perfect manner still its not happening. [httpStatus is 0]. When i try the same body in the rRST message "Test" functionality its working perfectly. May i know what is the issue.? Please let me know . ctomasipradeepksharma kalai
var r = new sn_ws.RESTMessageV2('rest message name', 'post');
var body = '{"JSON Body comes here"}';
r.setRequestBody(body);
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2016 05:44 AM
I wasn't aware of that either. Thank you for sharing Abu.
The only reason I can think of for blocking it is because REST, but default is a synchronous operation. For example, if it takes 10 seconds to get a response from the remote REST host, your browser is stuck waiting in a before/after business rule and presents a poor user experience. Async rules process in the background so the user doesn't have to wait.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 10:10 AM
The problem is that you need to dot walk the scope. For example: You have a rest message in the scope "assistants", you would need to write assistants.rest_message_here
var r = new sn_ws.RESTMessageV2('assistants.rest message name', 'post');