- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 08:57 PM
What is sn_ws in the syntax below? I understand RESTMessageV2() is a constructor based on ServiceNow’s documentation here: https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/c_RESTMessageV2API
What I don’t understand is why is sn_ws needed to call a constructor? What is sn_ws is it a class?
var sm = new sn_ws.RESTMessageV2();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 10:54 PM
@Justin Little In ServiceNow, sn_ws stands for " ServiceNow Web Service". sn_ws.RestMessage is a class in the ServiceNow platform that represents a REST web service message.
It's basically the name of the scope where RestMessage class has been created, in ServiceNow in order to access the classes it is required to prefix them with their scope name. hence sn_ws has been used whenever RestMessageV2 is been called.
Please mark this as an Accepted Solution / Helpful if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 09:04 PM
I regard it as a class ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 10:54 PM
@Justin Little In ServiceNow, sn_ws stands for " ServiceNow Web Service". sn_ws.RestMessage is a class in the ServiceNow platform that represents a REST web service message.
It's basically the name of the scope where RestMessage class has been created, in ServiceNow in order to access the classes it is required to prefix them with their scope name. hence sn_ws has been used whenever RestMessageV2 is been called.
Please mark this as an Accepted Solution / Helpful if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 06:14 AM
Thank you!!