RE: Power Automate: Check if regardingobjectid's type is contact
[quote user="Leah Ju"]
Hi Mariusssf,
Not using expression to get regarding type, you can add one ‘Get a row by ID’ step before getting regarding type, which can be more easily.
1.You can refer following screenshot and steps:
2.Result:
3.For the sake of testing rigor,i add another one 'compose' after trigger:
Compose1 has value and compose2 is null.
4.Then you can add one condition after compose to do following actions:
5.Test:
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
[/quote]
Hi Leah Ju.
Thank you for your reply. I do however have to use the expression to solve my issue, I think (?). I'll explain it in more detail.
My org. has set up contact/account to be contact - private customers and account - business customers. Kinda wrong use of the entities, but that's not what's relevant here. When creating an opportunity there are one lookup field for each of the customer groups, contact and account.
Both these are business required, with a script running that once one of those fields contains a customer, the other becomes read-only and is no longer business required. So when adding a new row for opportunity in the Flow both of these are business required.
This is why I am trying to use an expression on the fields, something like this: If regarding type == 'account' -> set regarding value, if not do nothing. The same expression will go for the contact field in the flow. The phone call that triggers the flow will always be created from the customer form, so regarding type will always be account or contact.
Any suggestions on how to solve this is highly appreciated.
Regards,
Marius