Is it possible to modify an existing record through a record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2022 11:23 AM
In the process of creating a menu item for an app that I'm developing for a school project, I came to the conclusion that I need to create a few user experiences before the service portal would lead me (or whom-ever I'm impersonating) to the correct page of the app.
However, since I designed my app to resemble a sign-in sheet, I made the app so that the correct way to use it would be modifying existing records instead of creating new records.
Now I have a question: Is it possible to modify an existing record through a record producer? Or, are record producers only capable of creating new records? If records producers cannot modify existing records, I might have to rebuild the app from scratch. ٩ (╬ʘ益ʘ╬) ۶
- Labels:
-
Guided App Creator
-
Studio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2022 11:30 AM
You can update an existing record in a record producer. Just add current.setAbortAction(true) in your producer script section to abort creation of new record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2022 08:45 AM
Thanks a lot! Would you mind giving this n00b an example on how to add this current.setAbortAction(true) to the script section? That would be greatly appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 03:40 AM
Example - https://community.servicenow.com/community?id=community_question&sys_id=29fe57d4db49681066f1d9d968961978
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 02:30 PM
So I see these scripts in the example that you provided:
var value = producer.variableName;
if(present){
gs.addErrorMessage('You are not allowed to submit');
current.setAbortAction(true);
}
Should I simply copy and paste these codes into my record producer? Or should I modify anything in accordance with my app?
Thank you in advance.