Apply reference qualifier on reference field based on new or existing record
New article articles in ServiceNow Community
·
Jan 08, 2025
·
article
Often, there is a need to apply a reference qualifier on a reference field based on whether it's a new record or an existing one. Out-of-the-box (OOB), this distinction cannot be determined.
A workaround is to call a function from a script include in the reference qualifier, passing current.sys_created_by.
- For a new record,
current.sys_created_byis empty. - For an existing record,
current.sys_created_byis populated.
Using this method, you can differentiate between new and existing records and apply your reference qualifier logic accordingly.
You can implement something like this in a script include and reference qualifier:
View original source
https://www.servicenow.com/community/service-operations-workspace/apply-reference-qualifier-on-reference-field-based-on-new-or/ta-p/3144028
Ankur Bawiskar