cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Case creation in Salesforce with related Contact - two Cases are created instead of one

I have setup a Flow that triggers when a email is hitting an inbox folder. (Trying to mimic Email-to-Case)

The email information should be converted into an Case in salesforce.

If the emails sender is a Contact in salesforce, the contact should be associated with the Case.

 

Within the flow, I use the "Get records" to call the Contact object. Next step, I create a case, where I apply the Contact. The Contact should only be applied if the email, is matching a Contact.

 

If the Contact is available, both a Case with the Contact and a Case without the Contact is created. Only one Case should be created. I have tried with an condition after querying the Contact object, but have not been able to avoid this double creation.

 

Flow Configuration.PNG

3 REPLIES 3
Solution Sage
Solution Sage

Hi @Andreas4 ,

From you discription, I am afraid the 'Get records' action has got two records.

Please check the Running result to check whether the action has got two records.

If so, the 'apply to each' action will create two records.

I suggest you use the 'Filter arrary' to get the record you want.

Sorry for that I don't has the permisssion to use 'Salesforce' connector.

I have made a test with a similar action.

Capture5.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

hi @v-zhos-msft 

Thanks for responding to my question.

It seems like i have old Flow running in the back ground. That creates the duplicate record.

I cannot identify the flow in the backend. Looks like there are one, at the connector level. But I get an error message when I click on it. I might not have the proper permissions to perform the action.

 

Hi @Andreas4 ,

I suggest you check the running result of the flow.

Via the filter, how many records did the flow get?

If the flow return multiple records, in the apply to each the flow will create record multiple times.

Capture7.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (8,019)