When Class is Application how to set the Category to Aplication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 03:06 AM
Just after some advice best practice and ideas.
Within Application we want to set some defaults for tables. What id like to do is set when the Category is Application the class should be application.
I've done a business over ride for the Category to be default Application which is working when this is saved but when users change the Category i don't want the Class to be application, so i only want this to apply when the Category is application.
Do you have any options looking at a business rule but happy to hear any alternate ideas suggestions ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 09:23 AM
Hi @Karl F-V ,
Best solution would be for this is writing a BR. Use this code in before BR.
// Business Rule: Set Class to Application when Category is Application
if (current.category == 'Application' && !current.class) {
current.class = 'Application'; // Set class to Application only if class is empty
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 12:59 AM
Thanks i will give this a try thought this would be the way forward.