Hi There!
I'm trying to create an MS flow that will link our cognito forms with our d365 crm. Specifically, I'm looking to do the following:
> A new entry is received to the specified cognito form
> An MS flow runs which searches to see if the company already exists on the CRM or not. If it does then it should update that record, if it does not then it should create an account record, contact record and a record in custom entity (Referrals)
The part bove is where I'm stuck. I can't work out how to tell it to check for duplicates.... does anyone have experience on this at all? I'm new to using this, so sorry if it's already been covered.
I've tried to say when a form is created, list all D365 Account records and put in a condition as the next step to look for any one of these items: contact name, phone, email, account or post-code, and if these are equal to anything supplied in the form, then just update that record, else create new, but it doesn't seem to work.
Any help would be awesome!
Thanks!
The error suggests that the list is empty ; your filter array is empty.
Can you tell me what is the issue you are facing with the List Records?
Hello @Mira_Ghaly and @Jcook,
So, my condition looks like this:
Can you share your flow History for the failed part?
Hi @Mira_Ghaly ,
Thanks, this is helpful.
Just a question though, this pulls in the data i need, but for the condition I need this:
If yes - create a record in the custom entity relating to this account record; If no, create the new account, contact and custom entity records.
So underneath the condition in the Yes/No columns, I've added the CDS > Create New Record but fro the Yes option, it is failing and looks as though it is trying to apply this to ALL records, not just the one I need... am i missing something? Screenshot below for info.
Thanks!
You need to use List Records with a filter expression depending on the field that you want to match duplicate on , in the below example i am checking on fullname and you should replace '' with the value from the form that you want to match against.
Then you will add a condition expression to check if the List returned records then it has duplicates otherwise use the condition as below:
with Left hand side equals:
If this post helps you with your problem, please mark your as Accepted solution.
If you like my response, please give it a Thumbs Up.
MG (Naturally Curious)