How to create system property that simplifies code and use in Business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 09:38 PM
Hi all,
Actually in time sheet we have tasks , to display those tasks we have to mention tables in the below
once we added our required table here , it will display on the tasks list ,once it is available , there is one custom BR is there checking here also
now the concern was like whenever we want another task to task list in time sheet we need to change these two places
so now i want to create one system property that combines these two things and need to used in , because of that instead of changing two places , simply we can update system property
Please help me to achieve this
Thanks
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 03:32 AM
property should hold value like this -> dmn_demand,kb_feedback_task
once you create that system property then update the condition as this
gs.getProperty('task_selector').indexOf(current.task.sys_class_name) == -1
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 04:11 AM
Thanks for the code,
Actually this is for BR, but i have to add one more thing to the property
this is the instance where the tables are added for the tasks which are display under tasks in time sheet, so this also need to include in the property as well
Thanks
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 06:52 AM
there you cannot use system property
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader