Can a business rule find its own Sys ID?

liv_cp
Giga Contributor

I would like to create a variable in a Business Rule containing its own Sys ID (dynamically) to pass that variable inti a function to another Business rule - how can I do this?

current.sys_id will get the Sys ID of the record that the business rule is running against. I would like to get the Sys ID of the business rule from itself when it is called.

9 REPLIES 9

to pass the data from a business rule to another rule


liv_cp
Giga Contributor

Not sure if you missed some of the question but I am asking how to get a BR to find its own Sys ID... Passing the data is no issue, it's finding the BR's own Sys ID that I am stumped on.


I dont see any other option.


Below thread had the same question. But hard-coding is the only option.



Get sys_id of Business rule which has been triggered



Please mark this response as correct or helpful if it assisted you with your question.

josh_nerius
ServiceNow Employee
ServiceNow Employee

Hi Liv,



I'm not aware of any way to obtain this value dynamically in the way you describe. I'm interested in understanding the goal here - can you explain the use case? What are you trying to accomplish with the sys_id? Can you lay out an example scenario and how you'd like use this? There may be another approach that can accomplish the same thing, but we need to better understand the business problem.


Hi Josh,



I have accomplished the goal in a different way already however I'm still curious about whether or not a BR can find it's own sys id.



Liv