2022
Issue: Record (Account/Opportunity/Candidate/Contacts) already exists in Salesforce and also in DataBase. But record ID was not brought back to DataBase for future reference.
Reason: Column of ID in DataBase is blank but record is already existing in Salesforce. During sync from DataBase to Salesforce, record from DataBase is unable to get the reference.
Fig 1: Mapping
Fig 2: Logs
Fig 3: Error status in field CANTIDERROR with ID at end and CANTRSFID null
{
String err = ERROR().trim();
return err.isEmpty() ? "" : err.substring(err.lastIndexOf(' ')).trim();
}
Fig 4: Updated mapping
5. Run the sync.
Fig 5: Logs of success
Fig 6: Updated CANTRSFID (with ERROR message)
Fig 7: Updated CANTRSFID (with SUCCESS message)