I have a package that contains some custom buttons - I'd like these buttons automatically added to the 4 standard layouts upon installation (Lead, Contact, Account, and Opportunity). Whats the best way to do this, custom post-install apex code? What would the method-call look like?


I think it can be achieved within ant and shell script.

  • retrieve all layouts you're interested with
  • add section with custom button name
  • deploy layouts back

Custom button are situated in the very beginning of layout:

Opportunity-Opportunity Layout.layout

<?xml version="1.0" encoding="UTF-8"?>
<Layout xmlns="http://soap.sforce.com/2006/04/metadata">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.