You need to sign in to do that
Don't have an account?
Santo
Can a custom field be use in the where clause of a SOQL.
//Java Code , Windows 2000
QueryResult qr;
String sql_where = " where customefield1 = 'Y' "
query = "Select id, name, customfield1, customfield2 from opportunity " + sql_where;
qr = sforce.query(query);
When I used a custom field in the where clause, the query return nothing.
Hi Santo,
You absolutely can use a custom field as criteria in a where clause. You just need to reference the field properly.
In the UI a custom field might be defined as:
Name: customfield
Label: custom field
From the describe call the field would be shown as:
Name: customfield__c
A valid SOQL where clause could be
Select Id From Contact Where customfield__c = 'New value'