0

I have cloned a standard page into a custom page. How do I remove the Save/New button from my custom page? Do I need to go into Developer Console...or???

4
  • Have you created a visualforce page or Is it new Page Layout for Object?
    – Devendra
    Oct 10, 2016 at 17:33
  • It's a custom object and I cloned the standard page layout for it. I can't remove the Save/New button from the original layout, and am hoping to be able to do so in the cloned edition.
    – Boots
    Oct 10, 2016 at 17:36
  • could you include a screenshot of the exact button you mean? I don't have a Save/New button on my standard page layout.. Oct 10, 2016 at 18:39
  • Guy, it appears on edit pages.
    – Boots
    Oct 10, 2016 at 18:50

1 Answer 1

1

You can not able to remove Save and New button from standard page layout.

Here is an Idea on IdeaExchange for the same.

One way is to override New button with Custom visual force page and only the required button. But this involves a custom code.

Override Standard Buttons

Create a Visualforce Page and Override it with a New Button.

<apex:page standardController="Account">
  <apex:form>
    <apex:pageBlock title="My Content" mode="edit">
      <apex:pageBlockButtons>
        <apex:commandButton action="{!save}" value="Save"/>
        <apex:commandButton action="{!cancel}" value="Cancel"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="My Content Section" columns="2">
        <apex:inputField value="{!account.name}"/>
        <apex:inputField value="{!account.site}"/>
        <apex:inputField value="{!account.type}"/>
        <apex:inputField value="{!account.accountNumber}"/>

        <!-- Add all required fields -->
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

Check Using Standard Controller Actions

7
  • Devendra, How is this done?
    – Boots
    Oct 10, 2016 at 17:47
  • Devandra, How do I edit the new component and identify the id of the button?
    – Boots
    Oct 10, 2016 at 18:00
  • I thought on adding a custom component to hide button, but I think that would not be ideal solution as it involves capturing the class/id of button and this css is under Salesforce control. SO, tweaking their css wont be good idea. Instead you can override the new Button with Custom visualforce page and on that VF page just show Save and Cancel button.
    – Devendra
    Oct 10, 2016 at 18:35
  • I agree with your idea of editing the button in a custom VF page. I don't know how to copy my cloned standard page into the VF page so I can see the code.
    – Boots
    Oct 10, 2016 at 18:43
  • Thanks for the override code. How can I view my cloned page in VF so I don't have to re-create the page in VF from scratch?
    – Boots
    Oct 10, 2016 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .