Validate Life cycle stage fields OOB Business Rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 12:19 AM
Hello All,
I have created a Data Source and Fix Script to updated "Life Cycle Stage" and "Life Cycle Satge Status" Fields. But it is not working, I got error message in Import message It is restricted a BR.
OOB BR Name: Validate Life cycle stage fields
Condition: global.CSDMUtil && global.CSDMUtil.isCSDMSupportActivationInstalled()
Script:
(function executeRule(current, previous) {
new global.LifeCycleUtil().validateUI(previous, current);
}(current, previous));
Anyone can explain me what is te purpose above before Insert/update BR in ServiceNow?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2023 12:54 AM
Hi, if you search for the function name in script-includes (script field) or via Studio code search you will find the function validateUI() in the script include global.LifeCycleUtil()
/nav_to.do?uri=sys_script_include.do?sys_id=e133b911b7220010ee0d3177ee11a93b
This function checks that the records life cycle stage and life cycle stage status are populated, and then calls private function _validateCombination() which checks to see if the records life cycle stage and life style stage status are correctly aligned.
Based on your post I would suspect that the values you are applying via script are not aligned in the reference table
/life_cycle_control_list.do?sysparm_query=&sysparm_view=