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
Jerrod Knapp 25Jerrod Knapp 25 

how do i delete a contact record in an external system?

We are using REST api to update records in an external system from Salesforce.  We can update records but how do we delete records that are deleted in salesforce?  Thanks in advance for any help.
Best Answer chosen by Jerrod Knapp 25
Raj VakatiRaj Vakati
You need to build the custom rest service to delete the record in the external system .. 
  1. Check if you have any service to accepet the HTTPDELETE operation on the external system or not 
  2. If not built one using api or tools 
  3. write before delete trigger in SF 
  4. Call the Delete Rest Api using the callouts 

All Answers

Raj VakatiRaj Vakati
You need to build the custom rest service to delete the record in the external system .. 
  1. Check if you have any service to accepet the HTTPDELETE operation on the external system or not 
  2. If not built one using api or tools 
  3. write before delete trigger in SF 
  4. Call the Delete Rest Api using the callouts 
This was selected as the best answer
Jerrod Knapp 25Jerrod Knapp 25
Thanks for your assitance Raj.  What will the trigger be doing?  Can you assist with the code?
Raj VakatiRaj Vakati
The trigger will be invoked when you delete the record and send the details to external system 

Refer this link for code

https://www.biswajeetsamal.com/blog/webservice-callout-from-apex-trigger/