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
pokalakari nagapokalakari naga 

How to clear the custom lookup field value when clone button is clicked

Hi all,

I want to clear the lookup field value when std.CLONE button is cliciked. I have tried with syntax below
https://cs5.salesforce.com/XXXXX0000000XXXX/e?clone=1&retURL=%XXXXXX000000XXXt&00N3A00000Cg7BD_lkid=&01I3A000002nfCG=

But the lookup value is not getting cleared. Can anyone help me overe here.

Thanks in advace.
Regarding,
naga.
GauravGargGauravGarg
Hi Naga,

Create a trigger on this object and clear the Lookup value on Before Insert event. 

Thanks,
​Gaurav
Purushotham YellankiPurushotham Yellanki
Hi Nage,

I agree with above solution from Gaurav and on top of it you can also make use of Workflow Field Update or a Process Builder to set the field value to null to make it even more simpler if you are looking Configuration and not Code




Thank you