You need to sign in to do that
Don't have an account?
pla
SQL query
Hello,
I wrote a simple query below in my Apex trigger but got the error that says "variable does not exist Type". Type is a standard field in the Account object. I do not understand why it throws me this error. Please help. Thanks
Account aName = [SELECT id, name, Type FROMAccountWHERE Carrier_ID__c =: CarrierId && Type == 'Client' && RecordTypeId == '01230000000XhdNAAS'limit 1];
Paul
Hi ,
Modify your query like below and try again .
Also make sure the variable carrierId is present
Account aName = [SELECT id, name, Type FROM Account WHERE Carrier_ID__c =: CarrierId and Type == 'Client' and RecordTypeId == '01230000000XhdNAAS' limit 1];
Thank you so much. It works fine now. Forgot about the and with &&.
Paul
Thanks, Rakesh