You need to sign in to do that
Don't have an account?
James Kinsey
VF Page that creates new opportunity in edit mode...
Hello,
I am new and seeking out how to code a VF page to insert a new opportunity and show this new opportunity in the edit mode before inserting (saving).
Thanks,
- James -
Here is my extension...
I believe that this will create the new opportunity but how do I tell the VF page to open this newly created opportunity in edit mode?
Find below a sample code :
<apex:page standardController="opportunity ">
<apex:form>
<apex:pageBlock>
<apex:pageBlockButton>
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButton>
<apex:pageBlockSection>
<apex:pageBlockSectionItem>
<apex:inputField value="{!opportunity.name}" />
// Here you can bind other field of opportunity like as given above
// and don't need to write apex code for saving and all that, just bind fields
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Thank you for the post!
This does develop a screen for field input with a save button, but I cannot input a value from my custom object, equipment__c, which I was attempting to have my controller extension get the data from.
// EX: <apex:inputfield value ="{!opportunity.amount}"/> but here have a field from my custom object already input in this field and in edit mode.
Also I cannot input this VF Page on my custom object as a custom button or link. I believe that since this page is using the opportunity controller i cannot use it on a custom object. So then the question is how do I create this VF page using the equipment__c standard controller and still have it get the equipment data and populate a new opportunity in edit mode?
And one last thing... Which came first, the chicken or the egg....?
:)
Thanks in advance!