function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abhishek Kumar 338Abhishek Kumar 338 

How do i save error reposnse in salesforce log file when api calling failed.

Consumig one API, i need to save errror response in salesforce inbuilt functionality such as log file. suggest if any.
I am using custom field to save true/false in case api pass/fails.
 
Syed Insha Jawaid 2Syed Insha Jawaid 2
Hi Abhishek 

Salesforce doen't provide any standard Error logging framework.
In order to capture the errors you can introduce an 'Error Logging' object that would be associated with the record and would capture the failure message.
Or if you know that your record would be synced only once to an external system then keep a text area on the record itself to capture error response like the status field.

Cheers!!!