Check if a variable which only exists at runtime but only in certain contexts exists

A Score Level 1

How do you check if a variable which only exists at runtime but only in certain contexts (i.e. if called from a record view it'll not be there but from a task it will) exists?

What I'm trying to do is find out where an expression rule is being used at runtime and logging that information for us to help diagnose a performance issue. These expression rules are used in hundreds of places across the application so it's not feasible to try and diagnose that way. We want to be able to see where the rule was called from, i.e. process node, interface, record list, record view, task... We've settled on checking the existence of pp!id / tp!id / rf!id to get information about where it came from and then query the analytics with that to identify the chain all the way back up to identify how it was executed. However, if you query these variables in the wrong context (e.g. pp!id when the rule is used in a record view), it errors out as the variable doesn't exist at runtime.

Any ideas?

Thanks in advance,

Caz

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data