• Pierre-François C
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi Everyone,

Do you know how to customize the Save button in a visualforce page, to open the new record created in edit mode, not in view mode (standard) ?
Hi All,

I'm trying to populate automatically a lookup field on a custom object, via a VF Page. So I have a small VF page, with a lookup, and a Save button with an hacked url behind the button. When I save, i'm correctly redirected to a new record on my custom object, but the lookup is populated with the ID of the previous lookup, and not the name. It is working, but it is not very user friendly !

Someone could help me on this topic ?

Thanks a lot

Here is my VF page

<apex:page standardController="Credit_Application__c">
    <apex:form >
        <apex:pageBlock title="New Credit Application" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="https://test.salesforce.com/a0d/e?who_id=&retURL=/&cancelURL=/&ent=Ev&CF00Nc0000000YaoU={!Credit_Application__c.Lessee_Name__c}&CF00Nc0000000YaoU_lkid={!Credit_Application__c.Lessee_Name__c}&00Nc0000000YKnQ=Draft&CurrencyIsoCode=CNY" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Leesee Information" columns="2">
                <apex:inputField value="{!Credit_Application__c.Lessee_Name__c}"/>
<apex:CommandButton action="https://test.salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=012c0000000CrzV&ent=Account" value="Create a new Leesee Account"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Hi All,

I'm trying to populate automatically a lookup field on a custom object, via a VF Page. So I have a small VF page, with a lookup, and a Save button with an hacked url behind the button. When I save, i'm correctly redirected to a new record on my custom object, but the lookup is populated with the ID of the previous lookup, and not the name. It is working, but it is not very user friendly !

Someone could help me on this topic ?

Thanks a lot

Here is my VF page

<apex:page standardController="Credit_Application__c">
    <apex:form >
        <apex:pageBlock title="New Credit Application" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandButton action="https://test.salesforce.com/a0d/e?who_id=&retURL=/&cancelURL=/&ent=Ev&CF00Nc0000000YaoU={!Credit_Application__c.Lessee_Name__c}&CF00Nc0000000YaoU_lkid={!Credit_Application__c.Lessee_Name__c}&00Nc0000000YKnQ=Draft&CurrencyIsoCode=CNY" value="Save"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="Leesee Information" columns="2">
                <apex:inputField value="{!Credit_Application__c.Lessee_Name__c}"/>
<apex:CommandButton action="https://test.salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=012c0000000CrzV&ent=Account" value="Create a new Leesee Account"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>