Please help with the explanation for incidentGetCaller()?

srirampappagudi
Tera Expert

Hi All,

Any one of you from the community can you explain how the dynamic filter incidentGetCaller() works?

I am not able to understand the flow right from the definition of the Data Dictionary to the Business Rule "incident function".

Please let   me know if there are any tutorials to understand the flow.

Thank you,

Sriram.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

It's a utility function that is called by the Dynamic Filter "incident get caller" (as you noted.)



If someone is opening a new incident, it checks to see if there is a parent record and it checks the current user's role.



If there is no role (implying and end user or ess user) then it uses the current user's sys_id to populate the caller field. If it is an itil user, then it tries to use the parent record's caller field as the caller's value.



This is to avoid ITIL people opening records and having to change the caller field all the time.


View solution in original post

6 REPLIES 6

It's a legacy thing Thomas. The current best practice is to use script includes rather than global business rules. However "incident functions" pre-dates script includes.

Script Includes load only when called. Global Business Rules are a bad practice for the reason you pointed out, they are loaded for every form in every case. They just sit there hoping someone will call them.

Fortunately, you cannot create global business rules in scoped apps (another plus for scoped apps.)

Chuck Tomasi
Tera Patron

FYI - A response to this post was featured on the Community Live Stream video. I invite you to watch the episode.

Video: Community Live Stream - 2019-10-24 - Developer Community - ServiceNow Community