You need to sign in to do that
Don't have an account?
Dorel4
Custom Button and Error message
I am trying to create a custom button on the Opportunity Page to update the stage. After you click the button you select from the picklist and hit save. I have used similar code for a button on a list view but I am getting an error message: Field Save does not exist check spelling
Here is my code, I am not sure what I am doing wrong. Why isn't Save an action not a field? Thank you.
<apex:page standardController="Opportunity" showHeader="true">
<apex:form>
<apex:pageBlock title="Opportunity Stage-Update" mode="edit" id="mub1">
<apex:pageMessages />
<apex:pageBlockSection id="mus1">
<apex:inputField value="{!opportunity.stagename}"> id="stagename">
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockButtons location="bottom" id="mubut">
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock title="Select Stage" id="muselectedlist">
<apex:pageBlockTable value="{!selected}" var="opp" id="mutab">
<apex:column value="{!opp.stagename}" id="oppstage"/>
</apex:pageBlockTable>
</apex:pageBlock> </apex:form>
</apex:page>
Here is my code, I am not sure what I am doing wrong. Why isn't Save an action not a field? Thank you.
<apex:page standardController="Opportunity" showHeader="true">
<apex:form>
<apex:pageBlock title="Opportunity Stage-Update" mode="edit" id="mub1">
<apex:pageMessages />
<apex:pageBlockSection id="mus1">
<apex:inputField value="{!opportunity.stagename}"> id="stagename">
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockButtons location="bottom" id="mubut">
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
<apex:pageBlock title="Select Stage" id="muselectedlist">
<apex:pageBlockTable value="{!selected}" var="opp" id="mutab">
<apex:column value="{!opp.stagename}" id="oppstage"/>
</apex:pageBlockTable>
</apex:pageBlock> </apex:form>
</apex:page>
<apex:page standardController="Opportunity"
showHeader="false"
id="muopp"
>
<apex:form id="muform">
<apex:pageBlock title="Opportunity Stage-Update" mode="edit" id="mub1">
<apex:pageMessages />
<apex:pageBlockSection id="mus1">
<apex:inputField value="{!opportunity.stagename}" id="stagename">
<apex:actionSupport event="onchange" rerender="muselectedlist"/>
</apex:inputField>
</apex:pageBlockSection>
<apex:pageBlockButtons location="bottom" id="mubut">
<apex:commandButton value="Save" action="{!save}" id="butsav"/>
<apex:commandButton value="Cancel" action="{!cancel}" id="butcan"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>