function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

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"/>

i really appreciate the help!

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"/>