+ Start a Discussion
JessBJessB 

Set the Save button to save to the Standard Object?

I created a VF page that needs to open from the Lead record; this is called Change Lead Status, and is meant to duplicate the "Change Lead Status" page that appears when you are on a view on the Tab, and you can select multiple records, click Change Lead Status, and upon save, it saves the status to the records you selected (it also returns you to the Lead tab).

 

I need the user to be able to:

1. Click the Custom Link "Change Lead Status" on the Lead Record page, and have a custom VF page open that only allows them to change the Lead Status.

2. Click save, and have this Lead Status they selected save to the record they came from. Upon save, be returned to the Lead record.

3. If click Cancel, return to the Lead record.

 

How do I do this?

 

So far, my page looks like this:

<apex:page standardcontroller="Lead">
<apex:form >
<a name="skiplink"><img src="/s.gif" height='1' width='1' alt="Content Starts Here" class="skiplink skipLinkTargetInner zen-skipLinkTarget" title="Content Starts Here"/></a><div class="bPageTitle"><div class="ptBody"><div class="content"><img src="/s.gif" alt="Lead" class="pageTitleIcon" title="Lead"/><h1 class="pageType noSecondHeader">Change Status</h1><div class="blank">&nbsp;</div></div><div class="links"><a href="javascript&colon;openPopupFocusEscapePounds(%27/HelpAndTrainingDoor?loc=help&amp;target=leads_massaction.htm&amp;section=Leads%27, %27Help%27, 1024, 768, %27width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no%27, false, false);" title="Help for this Page (New Window)"><span class="helpLink">Help for this Page</span><img src="/s.gif" alt="" class="helpIcon"/></a></div></div><div class="ptBreadcrumb"></div></div>
<h1>Select New Status</h1>
<apex:inputfield value="{!Lead.Status}"/>
<apex:commandbutton value="Save" action="{!Save}"/> <apex:commandbutton value="Cancel" action="{!Cancel}"/>
</apex:form>
</apex:page>

bob_buzzardbob_buzzard

Can you repost your code using the 'insert code' button - the clipboard with the 'c' icon on it in the toolbar - that will preserve the formatting for us.