Skip to main content

Hello,

 

I am using Open API 3.0 to connect two Salesforce orgs. I have a scenario where,

 

Let's say

  1. Source Org Account Name : Salesforce, USA
  2. Target Org Account Name: Salesforce, USA

There is a duplicate rule in Target Org which doesn't allow us to create the accounts with the same names.

 

So, when I tried to push the source org record to Target org and I got the error as ( 400 response code)

Result: [{

"message_set" : true,

"message" : "Please choose one of these records instead.",

"errorCode_set" : true,

"errorCode" : "DUPLICATES_DETECTED"

}]

My questions are,

  1. Is there anyway to get extract message only from the response?
  2. Is there anyway to get the duplicate record Id from the Target org which I can update the Id back to one of the Account's fields in source org?

The response result doesn't return any details apart form the above message so that makes hard for me to refer the target org accountId.

Thank you in advance.

#HTTP POST Method #Httpcallout #Flow

2 Antworten
  1. 14. Aug. 2023, 19:57

    I was able to capture the message details separately. 

    So, the general Variable/Formula fields won't support to do it. So I created a text template field to capture the data and applied some formula functions to extract the details that I was looking for.

     

    It would be better if Salesforce allows us to store these details in a formula field directly and use it for screen flows.

     

    Any idea on point 2?

0/9000