If I have an object like Account , Contact , or a custom object , is it possible to add a custom button (or custom Action) on the Edit page ?

  • 1
    What does this have to do with the Communities feature? – Adrian Larson Apr 23 '17 at 14:15

Custom Buttons and Object-Specific Actions do not appear on Object Record Pages when in Edit mode. They are intended to be used from Detail or other Pages to automate the creation of new records, opening detail pages in edit mode with pre-defined values populated, opening records for editing in some context, auto-updating records, or performing other types of actions such as opening an external web link.

An Edit page is already in "Edit mode", so clicking a button or action from within one could easily create conflicts with the controller for the object. Standard buttons for the object's controller (or a custom page controller that's been substituted) need to be respected and observed in those situations. That isn't to say that a custom button defined for use on a custom page to work within the confines of the custom controller couldn't be utilized while editing the page; provided it called a method contained in the page controller.

Additional Help references you may want to review are Custom Button and Link Samples and Actions Best Practices.

  • According to your answer I understand that we can not add a button in an edit page like Edit Contact for example. So , Is there an another option to be able to modify the fields in edit mode like enter or replace data in the fields of an edit page ? – Raphym Apr 23 '17 at 14:59
  • If a user has the correct permissions, they can edit the fields manually when in Edit mode. Can you give a more specific example of what you want the button to do? It may be that you need to use a BeforeUpdate trigger. – crmprogdev Apr 23 '17 at 15:05
  • Yes exactly, I have a trigger Before Create to Encrypt fields that the administrator will have chosen. And I want to add a trigger Before Update or a simple button (Decrypt on the edit page), in order to decrypt the data before edit them. So when the simple user click on edit page I would like to display the true value and not the encrypted value. – Raphym Apr 23 '17 at 15:15
  • It sounds as though your real issue is that your users don't have permissions to view encrypted data. You'd be violated the principles behind encryption security if you decrypted it for them. This is something you don't want to do. Either give them permissions to view encrypted data, or don't allow them to edit those fields. – crmprogdev Apr 23 '17 at 15:24
  • 1
    Then I'm not certain I understand you question. If the owner of the data encrypts it and other users have permission to view encrypted data, are you saying you wanting to decrypt data for other users where they don't have the proper permissions via sharing? – crmprogdev Apr 23 '17 at 15:59

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.