- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2021 11:18 PM
Hi All,
Is this possible to submit the Record Producer from the script .? if ye kindly provide the sample script or any sample
Thanks
Ramesh R
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2021 01:25 AM
Hi Ramesh
Your Raw value needs to be enclosed inside the variables object.
ex. {'variables':{'description':'description','short_description':'short_description'}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2021 10:46 PM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2021 01:25 AM
Hi Ramesh
Your Raw value needs to be enclosed inside the variables object.
ex. {'variables':{'description':'description','short_description':'short_description'}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 01:08 AM
Hi Ramesh
if I understand you want to submit manual. I have been in the same pages. after some try and error I found this.
I hope it helps you. you can use it client script on submit.
function onSubmit() {
if (g_scratchpad.isFormValid) {
return true;
}
var actionName = g_form.getActionName();
if(some_condition_meet){
g_scratchpad.isFormValid = true;
g_form.submit(actionName);
}
return false;
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 08:41 AM
I got it working by using the CatItem API. Example from ServiceNow docs:
var catalogItem = new sn_sc.CatItem('3f1dd0320a0a0b99000a53f7604a2ef9'); //sys_id of the Create Incident record producer
var values = {
"variables": {"urgency" : "2", "comments" : "Laptop is in a brick state"},
"sysparm_id": "3f1dd0320a0a0b99000a53f7604a2ef9"
}
var targetRecordDetails = catalogItem.submitProducer(values);
gs.info(JSON.stringify(targetRecordDetails, null, 3));
Source: CatItem - Scoped
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 04:40 AM
Any idea how to set Opened for, Opened by, Requested for fields in this catItem API? I am trying to create a case on HR core case table