Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.
19 answers
  1. May 21, 2018, 6:24 AM
    Hi Shiv,

    Your trigger should look something like this:

     

    trigger CloneOpp on Opportunity (after update){

    Custom_Object__c[] ls=new Custom_Object__c[]{};

    for(Opportunity o: trigger.new){

    Custom_Object__c obj=new Custom_Object__c();

    //Assign whichever values you want to clone to the fields of your custom object, for example:

    //obj.name=o.name;

    ls.add(obj);

    }

    insert ls;

    }

    Let me know if it helps.

    Thanks!
Loading
0/9000