+ Start a Discussion
SolidLucasSolidLucas 

how to query a parameter on a search field type?

guys i would like to know how can i pass a query into a field of search type(parameter) beacuse when i do a query its returning this error

[object Object]: Cia__c, Ativo__c FROM Account where Cia__c ='Test' ^ ERROR at Row:1:Column:167 invalid ID field: Test

my visualforce is like that 

<apex:selectList value="{!cia}" multiselect="false" size="1" label="Cia">
                          <apex:selectOption itemValue="" itemLabel="--Nenhum--"/>
                          <apex:selectOption itemValue="Test" itemLabel="Test"/>
                          <apex:selectOption itemValue="Test2" itemLabel="Test2"/>
                      </apex:selectList>&nbsp;&nbsp;


i really appreciate the help!
 

BalajiRanganathanBalajiRanganathan
what is Cia__C field? is it Relationship field?. 

if it is relationship field then you need to have the selction option itemValue in itemValue="<ID>" format.
for example <apex:selectOption itemValue="a3Nn00000009O4M" itemLabel="Test"/>