You need to sign in to do that
Don't have an account?
boihue
Thanks for the help!
Question regarding apex:inputField
Hi,
I am developing a new Visualforce Page using the Extensions option on a new Apex Controller named OpportunityProductController. In this Visualforce Page, I'm using the apex:inputField for a Picklist field (Section__c). In the Save function of the OpportunityProductController Apex Controller how can I retrieve the value of this Section__c Picklist that was selected by the user? I need to save this value into another Custom object that's why I need to retrieve its value. Is there any Apex component that we can use for having a Calendar like the apex:inputField based on the Date field of Salesforce object?
Code:
<apex:page standardController="OpportunityLineItem" extensions="OpportunityProductController" title="Product" tabStyle="Opportunity"> <apex:sectionHeader title="Opportunity / Product"> <apex:form> ... <apex:inputField id="cwSection" value="{!OpportunityLineItem.Section__c}" /> <apex:inputField id="cwService" value="{!OpportunityLineItem.ServiceDate}" /> ... </apex:form> </apex:sectionHeader> </apex:page> public class OpportunityProductController { public PageReference Save() { // Apex Codes (Retrieving of Section__c value) } }
Thanks for the help!
Boi Hue
Thansk Sam for your quick response!
But how can I code in my Apex Controller to retrieve the latest value of OpportunityLineItem.Section__c selected by the user?
Regards!
this assumes a variable in your extension called controller, initialize this from your constructor.
and controller:
It's working perfectly. Thanks for your help.
Best regards!