Today I got a requirement to update the Case record when a phone call record is created or update under Case. Yes, it is very simple requirement and we can use OOB Workflow and finish it in 10 minutes. As we all know that workflows are getting deprecated, I started using Flow.
It was fine, I have added all the required steps and below is the condition I have taken for checking the regarding object type but when I was testing it was never satisfying.
Created two steps as Initialize and Set Variable to understand what exactly the value that is coming to the field.
To my surprise, the result is null and my doors are closed to check the condition.
If I leave it like this, the flow will trigger and every phone call create/update and tries to update the Case and fails if the phone call is not associated with the Case record.
After some search came to know that we have to below expression to check the Regarding Type and it worked for me.
Hope this helps.