- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I need to create catalog item to create/update/delete custom table data ,could you please suggest good practice.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Rajyalakshmi ,
Not quite understand your question. You can off course create a catalog item, and then setup rules on the backend to create/update/delete.... What have you tried so far and where do you get stuck.
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use catalog item for this with variables
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hii @Rajyalakshmi,
I understood your use case. I actually got the same question in an interview.
To achieve this, you need to create a Record Producer with 3 variables:
Table (Reference → sys_db_object)
Description (String)
Caller (Reference → sys_user)
Below is the script I used for mapping the variables dynamically.
You can apply the same logic:
// Ensure variable names match those defined in the Record Producer
var selectedTable = producer.select_table;
var caller = producer.caller;
var description = producer.short_description;
if (selectedTable == 'incident') {
var inc = new GlideRecord('incident');
inc.initialize();
inc.caller_id = caller;
inc.short_description = description;
inc.insert();
action.setRedirectURL(inc);
current.setAbortAction(true); // Prevent default record creation
} else if (selectedTable == 'problem') {
var prob = new GlideRecord('problem');
prob.initialize();
prob.caller_id = caller;
prob.short_description = description;
prob.insert();
current.setAbortAction(true); // Prevent default record creation
}
If this helps, please mark the answer as helpful in the ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
14 hours ago
I have created catalog item with set of variables ,and implemented flow using create /update /delete record actions .It is working as expected .flow actions are very useful with no code ,able to achive requirement.