i am not able to post Requested for field using the API explorer to the sctask table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 12:57 AM
i am using buy item ( post) , using catalog task API . it is getting a blank field on it . when the req is created
{
"sysparm_quantity" :"1",
"variables":{
"requested_for" : "",
"type_of_room_sqeep_00" : "",
"time_of_room_sweep" : "",
"building" : ",
"select_location_00" : ",
"business_justification" : ""
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 01:27 AM
you should be using Cart API in REST Explorer to submit a request and it will create REQ, RITM
Why to use Catalog Task API?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 04:55 AM
@Ankur Bawiskar or to use this ?
var cart = new sn_sc.CartJS(); var item = { // Note that values using CartJS are instantiated via a JSON object 'sysparm_id': '060f3afa3731300054b6a3549dbe5d3e', 'sysparm_quantity': '1', 'variables': { 'ram': '16', 'os': 'win10', 'storage': '1tb' } }; var cartVals = cart.addToCart(item); // The addToCart function returns a JSON object reflecting the status of the cart var checkoutVals = cart.checkoutCart(); // The checkoutCart function returns a JSON object with info about the submitted cart, contents varying if two-step checkout is active
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 05:23 AM
what's your business requirement?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 05:36 AM - edited 11-23-2023 05:45 AM
@Ankur Bawiskar what i was trying to do is to use Microsoft power automate http function and servicenow rest aPI explorer to post a rest API call to a certain form to create ritm, req and sctask
variable :
"requested_for" : "",
"type_of_room_sqeep_00" : "",
"time_of_room_sweep" : "",
"building" : ",
"select_location_00" : ",
"business_justification" : ""