1

I have created a record triggered flow on Opportunity; based on a certain condition it creates a Contact.

When I create / edit an Opportunity, it creates the Contact. Till here it is working as expected.

But whenever I am editing the record again, it creates the record - thus it creates duplicates. I want to create the record only one time.

2
  • Hi Vinay, Welcome to SSE. I hope you have kept the start condition as when the record is edited so every time the record is edited it is creating the record. If contact gets created while Opportunity can you confirm why do we ned while update as well . Jun 3 at 5:51
  • This seems to be an XY Problem. Because while the answer given works, that seems to me to be putting a Band-Aid on a bullet wound (plaster on a gunshot wound, for those speaking UK English) instead of better evaluating/considering the underlying conditions. That plus the other two open-ended questions you have asked since then suggest to me that you might be benefitted by either some Salesforce Trailhead training, or general development/admin critical thinking training, or both.
    – Moonpie
    Jun 5 at 12:35

1 Answer 1

0

I dont understand the use case of creating the contact based on opportunity, but ... This case seems to be of recursion. You can create the checkbox field on opportunity and by default it has to be false. Add the condition in flow that if the checkbox is false+other condition, then only create the contact and update that checkbox to true. So when the record is created that checkbox will get updated and next time when you edit the opportunity, it will not create any contact as the checkbox will be true and it will not meet the condition.

1
  • It worked, Thank you.
    – P Vinay
    Jun 3 at 6:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.