Table of Contents
P2K_CF_ECR_EXISTS#
The workflow custom function called P2K_CF_ECR_EXISTS reads through the Contact Role Contact Types and returns TRUE if it finds a match to the value populated to the UserCalc global CONTACT_TYPE or FALSE if it does not.Setup#
In the IMUC screen create the Global called CONTACT_TYPE as a type of “Char”.P2K_CF_ECR_EXISTS_01.JPG
Sample Work Flow UserCalc#
A sample Work Flow UserCalc in its simplest form (see example in screenshot) would be to set the CONTACT_TYPE global to ‘03’ (Emergency Contact) then call the P2K_CF_ECR_EXISTS custom function.If the triggering contact record has a contact type with “Emergency Contact” set, then the custom function will return TRUE and the system proceeds to the next line, otherwise the system jumps to the end.
In our sample, the result of getting TRUE returned has the Security Level being set to ‘01’ which represents “Emergency”.
This scenario will only work when UPDATING a contact record. This will not work when inserting a new record as the contact type must already exist on the record in order for the custom function to be able to read it.
In a real world scenario you would add conditions to the UserCalc to check whether the security level already had a value.
P2K_CF_ECR_EXISTS_02.JPG