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
BritishBoyinDCBritishBoyinDC 

Packing Custom Buttons with Parameters

I have a simple custom button in my Dev Org, that clones the current record, but also passes in a parameter into a custom fields e.g.

 

 

/{!mycustomobject__c.Id}/e?clone=1&retURL=%2F{!mycustomobject__c.Id}&00N500000023pHE=1

 

where 00N500000023pHE is the Id of the custom field.

 

When I package and deploy this though, the Custom field Id reference is not updated to reference the newly created custom field. Instead, it is still the same as the above...

 

Is there anyway to change the way I build this to enable me to package this button with a the parameters, but have them work with the fields in the target Org?

 

Thanks

 

A_SmithA_Smith

The only way to do this is build a VF page for your target page instead of depending on the standard salesforce page.  Then you can pass in the parameters, process them with a custom controller extension, and set them on the page.  

gv007gv007

can you more clearly explain what u are doing.