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
AmayAmay 

How do i support custom object information on create/update to external system?

Currently, I'm supporting custom object integration with external system through triggers and future callouts, but it seems like if a customer is mapping that custom object then he would have to create a trigger manually with standard code (common for standard objects) in salesforce calling TriggerHandlerClass and FutureCallouts. Is there any better way to do custom object's integration?
AmayAmay

My Trigger code looks like 

trigger Custom_object_webhook on Custom_webhook (after insert, after update) {
            if (Trigger.isInsert || Trigger.isUpdate) {
                TriggerHandlerClass.isInsertOrUpdate(trigger.new, trigger.oldMap);
            }
}

public class TriggerHandler {
//calls Utility class for callouts
}

global class Utility {
@future(Callout=true)
public void sendMethod () {
// request.setEndpoint(callout_URL);
        request.setMethod('POST');
        request.setHeader('Content-Type', 'application/json;charset=UTF-8');
        request.setBody(payload); //payload is custom object/standard object info on create/update
  }
}

fsabg hgfjnyhfsabg hgfjnyh
I thin there are some issues that you have to fix for custom object information in the code you can click here (https://removalsfordoncaster.co.uk/) to resolve this equation.