Skip to main content

Notifications

Power Automate - Building Flows
Answered

Detect error alerts from Salesforce when creating accounts

Posted on by 38

Hi,

 

I currently have a Flow that grabs accounts from Dynamics CRM and inserts to Salesforce. When it attempts to insert to Salesforce, there is a matching rule configured in Salesforce that checks for different criteria to determine whether the account is a duplicate or not. If it is, the account won't be inserted and Salesforce returns the following:

{
  "status"400,
  "message""Salesforce failed to complete task: Message: Duplicate Alert\r\nclientRequestId: fb141ec7-c5b4-4a2d-9371-18e3f30339e4",
  "error"null,
  "source""Salesforce.Common",
  "errors": []
}
 
The flow would then stop executing, even though there are additional accounts to process. I was wondering if there's a way to make Flow detect this error, send me an email and then continue processing? (e.g. it would bypass this account).
 
Sincerely,
 
Jason
 
  • askondo Profile Picture
    askondo on at
    Re: Detect error alerts from Salesforce when creating accounts

    @abm Thanks for always keeping the forum active.

  • Jason Yeung Profile Picture
    Jason Yeung 38 on at
    Re: Detect error alerts from Salesforce when creating accounts

    @abm,

     

    Thanks for your help!

     

    Sincerely,

     

    Jason

     

  • Verified answer
    abm abm Profile Picture
    abm abm 32,250 on at
    Re: Detect error alerts from Salesforce when creating accounts

    Hi @JasonYeung 

     

    Yes you can catch error handling in Power Automate. Please my blog which explains a similar scenario

     

    Power Automate – How to find a folder exists (Dynamic) in SharePoint? | @mydevexperience #Flownaut Super User III (@abm) (wordpress.com)

     

    Here is another link 

     

    Try-Catch pattern in Microsoft Flow • Tomasz Poszytek, Business Applications MVP

     

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,532

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,050

Leaderboard