You need to sign in to do that
Don't have an account?

Doubt: soql query
Hi Everyone,
how to write a soql query
we have two picklist.
one is industry picklist-standard controller Account
another one is product(Product__c) picklist - custom object accproducts__c.
I want to pass these two picklist as a input to get a record
I tried and doesn't work the query
error:Unknown error parsing query
Thanks,
M. Sivasankari
how to write a soql query
we have two picklist.
one is industry picklist-standard controller Account
another one is product(Product__c) picklist - custom object accproducts__c.
I want to pass these two picklist as a input to get a record
I tried and doesn't work the query
select a.Name,a.ID,ap.Product__c from account a,accproducts__c ap where a.id=ap.account__c and ap.Product__r.name='GenWatt Propane 1500kW' and a.industry='banking'
error:Unknown error parsing query
Thanks,
M. Sivasankari
WHERE Industry ='Your Industry'
Thanks,
Sumit Kumar Singh
Thanks.
After changed the accproduct__c to accproduct__r , it provide the result based on industry alone . I need both industry and product.
I attached the screenshot of my scenario .Please view it and help me.
Thanks in advance
Sivasankari.M
Assuming 'Product__c' is the lookup field on 'Account produacts'
Pls, let me know if it helps you.
Thanks.
As you said Product__c is the lookup field.Its right in my scenario.
But Industry is the Account standard field
so it shows the error as,
Thanks
Sivasankari M
Thanks,
sumit kumar singh
Industry field is not in the accproducts__c(custom) object;
accproducts__c Fields are:AccountId,ProductName;
Account(standard) Object Fields:Industry,AccountId, Account name.
Same error shown.
Thanks.