Activity Forums Salesforce® Discussions Detect when a record is being cloned in Salesforce trigger?

  • PRANAV

    Member
    September 9, 2016 at 5:49 am

    Hi Tanu,

    One approach would be to create a new field, say field__c, which gets populated by a workflow (or trigger, depending on your preference for the order of execution) when blank with the salesforce id of the record. For new records this field will match the standard salesforce id, for cloned records they won't. There are a number of variations on when and how and what to populate the field with, but the key is to give yourself your own hook to differentiate new and cloned records.

    Second approach would be , you can override the standard clone button with a custom page that clears the values for a subset of fields using url hacking.

    Hope this helps you.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos