Problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2024 09:24 PM
When creating a problem ticket if the urgency and impact are high, I need to generate automatic ptask with some fields to auto populate and then the ticket should be created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2024 10:21 PM
Hi @Anantha27 ,
I would recommend you to utilize flow designer, as here you can build the logic without scripting.
if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
best regards
Anders
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
‎11-04-2024 10:54 PM
Hi @Anantha27 ,
Create a Before BR on Problem table and add Filter condition is - Urgency - 1- High and Impact - 1 - High and add below code
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var pTaskGR = new GlideRecord('problem_task');
pTaskGR.initialize();
pTaskGR.description = current.description;
pTaskGR.problem = current.current.sys_id;
pTaskGR.urgency = current.urgency;
pTaskGR.impact = current.impact;
pTaskGR.short_description = current.short_description;
pTaskGR.insert();
})(current, previous);
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2024 11:12 PM
The best use will be an After BR not before
If there’s an error in the record creation process, it may prevent the original insert or update from completing, leading to potential data loss or inconsistency.