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

SanjivMeher
Kilo Patron
Kilo Patron

Hi Liv,



You can query the sys_script table with name of the business rule to get its sys_id.



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

liv_cp
Giga Contributor

Hi Sanjiv,



I am looking for methods that avoid hard-coding anything and this would require hard-coding its name into a GlideQuery



Liv


dvp
Mega Sage
Mega Sage

Just curious. Is there any specific reason why you couldn't use script include?


liv_cp
Giga Contributor

To do what... ?