Outbound Rest API throwing error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2024 10:34 AM
Hi Team,
I need to integrate SNOW to SNOW using App Studio. I have created Outbound REST (POST) to send data. When I test this connection in REST Messages, it works and gives 201 (success).
But when I try to use it in the Script-include it gives the error "function getStatusCode() {[native code, arity=0]}"
Here is the Below script that I am passing through Script-Include but getting error "function getStatusCode() {[native code, arity=0]}"
===============================
var r = new sn_ws.RESTMessageV2('API Integration', 'Acknowledge Service Ticket');
r.setStringParameterNoEscape('TicketNumber', current.u_external_ticket_no);
r.setStringParameterNoEscape('CustomerTicketNumber', current.number);
gs.info(r);
var response = r.executeAsync();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode;
gs.info(httpStatus);
var parser = new global.JSON();
var responseObj = parser.decode(responseBody);
return responseObj;
=========================
Need help on this, if anyone found this issue and a solution for this.
Thanks
Balaji Prusty