• admin1.3957598082281821E12
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi guys,
I'm a newbie force.com developer: I'm triyng to implement a VF page using URL function passing parameter based on the selected record from a list in the previous VF page, but I have a problem with the autopopulating of a lookup field: can anyone help me, please?

This is the code for my VF page: 


<apex:page controller="Sebi_ControllerSelezionaMacchina">

  <apex:outputLabel value="{!exec_message}" id="msg"/>
<apex:pageBlock >

<apex:PageBlockTable value="{!ListaCar}" var="c" columns="3">
   <apex:column value="{!c.Name}"/>
   <apex:column value="{!c.AvailabilityLights__c}"/>
   <apex:column value="{!c.RatingCar__c}"/>
   <apex:column >
       <apex:form >
         
             <apex:commandButton value="Select" action="{!URLFOR($Action.Journey__c.New,null
,['Car_Select' = '{!$c.Id}' ])}" />


<!-- 'lookupRecordId'= '{!currName.Id}'  ['lookupFieldId'=value]  ['Car_Select__c' = '{!c.Id}' ] -->

          
       </apex:form>
   </apex:column>   
</apex:PageBlockTable>
</apex:pageBlock>

</apex:page>

Hi guys,
I'm a newbie force.com developer: I'm triyng to implement a VF page using URL function passing parameter based on the selected record from a list in the previous VF page, but I have a problem with the autopopulating of a lookup field: can anyone help me, please?

This is the code for my VF page: 


<apex:page controller="Sebi_ControllerSelezionaMacchina">

  <apex:outputLabel value="{!exec_message}" id="msg"/>
<apex:pageBlock >

<apex:PageBlockTable value="{!ListaCar}" var="c" columns="3">
   <apex:column value="{!c.Name}"/>
   <apex:column value="{!c.AvailabilityLights__c}"/>
   <apex:column value="{!c.RatingCar__c}"/>
   <apex:column >
       <apex:form >
         
             <apex:commandButton value="Select" action="{!URLFOR($Action.Journey__c.New,null
,['Car_Select' = '{!$c.Id}' ])}" />


<!-- 'lookupRecordId'= '{!currName.Id}'  ['lookupFieldId'=value]  ['Car_Select__c' = '{!c.Id}' ] -->

          
       </apex:form>
   </apex:column>   
</apex:PageBlockTable>
</apex:pageBlock>

</apex:page>

Hi All,


Can anyone share an idea on how to pass a parameter in the $Action New. I am using commandbutton in a custom vf page in a related list that is when click it will be redirected to the creation of new record with its parent object being autopopulated in the lookup. Here's my code:

 

<apex:commandButton action="{!URLFOR($Action.Tutor_Session__c.New)}" value="New Tutor Session" id="theButton" />

 

I need to pass something in the action of commandbutton so that it will autopopulate the lookup in the new page when redirected.

 

Please advise.

 

Thanks in advance