To create "CallOut" action in DRO steps : To create callout we need to create "Integration Definitions" setup -> Integration Definitions on search -> create new -> Once you click on save it will redirect to this page Step1 : Create Class like global with sharing class CustomFulfillmentProvider implements industriesintegrationfwk.ServiceIntegrationProvider { // 1. Primary synchronous invocation logic global industriesintegrationfwk.IntegrationCalloutResponse invokeMethod(String method, Map<String,Object> inputMap) { industriesintegrationfwk.IntegrationCalloutResponse response = new industriesintegrationfwk.IntegrationCalloutResponse(true); try { // STEP A: Extract the Orchestration Record Context IDs from the framework map String targetRecordId = ''; ...
1. Scenario Overview This automation solves an Amazon Interview Question based on a parent-child relationship between a parent object, Tax_Firm__c , and a child object, Employee__c . The parent features two currency fields: Max_Salary__c and Min_Salary__c . The system must dynamically recalculate and roll up the highest and lowest employee salary values to these parent fields whenever any child employee record is inserted, updated, deleted, or undeleted . Additionally, the solution handles the edge case where all related employees are deleted from a firm, safely resetting the parent summary values to zero instead of leaving stale metrics behind . or Show the Min & Max Salary of Employee records on the Parent Company record. 2. Apex Handler Class public class EmployeeTriggerHandler { public static void updateSalaryRollups(List<Employee__c> newEmployees, List<Employee__c> oldEmployees, Map<Id, Employee__c> oldEmployeeMap) { ...
1. Scenario Overview This automation addresses a TCS Interview Question involving roll-up style calculation across parent-child relationships. The Account object contains a custom text field named Max_OPP__c . The requirement mandates that this field must always display the Name of the related Opportunity record that has the highest Amount . Because this value can change across any data mutation phase, the trigger handles a full suite of events ( after insert , after update , after delete , and after undelete ) to safely re-calculate metrics on parent Accounts. or Update the Parent Account field with the Opportunity Name that has the Highest Amount. 2. Apex Handler Class java public class OpportunityTriggerHandler { public static void updateMaxOpportunityName ( List < Opportunity > newOpps , Map < Id , Opportunity > oldOppMap ) { Set < Id > accountIds = new Set < Id >(); // Phase 1: Track all impacted Account IDs acros...
Comments
Post a Comment