You need to sign in to do that
Don't have an account?
Changed Lookup to picklist in Vf Page & Trying to save !!!
Dears,
1. I changed lookup to picklist in vf page
2. Selected picklist value is not saved in corresponding field.
Can anyone please advise ??
@controller
@VF PAge
1. Getting AddressId by {Get;set;}
2. Then how can i save this object.
Thanks in advance !!
Regards,
Soundar P
1. I changed lookup to picklist in vf page
2. Selected picklist value is not saved in corresponding field.
Can anyone please advise ??
@controller
Public Class lookuptoPick{ Public String AddressId{Get;Set;} public list<selectOption> getPickAccountVals(){ list<selectOption> options = New List<selectOption>(); options.add(new selectOption('' , '-- None --')); for(Clinical_Address_Association__c claddr: [Select id,name from Clinical_Address_Association__c]){ options.add(new selectoption(claddr.id,claddr.name)); } system.debug('Options |' + options); return options; } Public void save(){ // Insert Object Here } }
@VF PAge
<apex:pageBlockSectionItem dataStyle="width:1%" labelStyle="width:1%" > <apex:outputLabel >Address Id</apex:outputLabel> <apex:selectList size="1" value="{!AddressId}" label="Address ID" multiselect="false" style="width:180px"> <apex:selectOptions value="{!PickAccountVals}" ></apex:selectOptions> </apex:selectList> </apex:pageBlockSectionItem>
1. Getting AddressId by {Get;set;}
2. Then how can i save this object.
Thanks in advance !!
Regards,
Soundar P
Hope this works,
Thanks
All Answers
Hope this works,
Thanks
I am really abbriciate your answer ... i am getting following error while saving. Please Look my code below.
@controller
Note : I am getting a following error
Error : Address ID: Value does not exist or does not match filter criteria.
Thanks in Advance !!!
Regards,
Soundar Rajan P