You need to sign in to do that
Don't have an account?
Pavani Akella 9
How to write NOT operator in an apex trigger SOQL query
I would like to add a clause in the query where status not equal to "Approved or Closed or Denied". How do I add that logic in this query
List<Case> cas=Database.query('SELECT Id,CaseNumber FROM Case WHERE AccountId =\''+sc+'\' AND VIN_Entry__c =\''+ event.VIN__c+'\'');
Thanks in advance!
List<Case> cas=Database.query('SELECT Id,CaseNumber FROM Case WHERE AccountId =\''+sc+'\' AND VIN_Entry__c =\''+ event.VIN__c+'\'');
Thanks in advance!
I think this should work fine.
List<Case> cas=Database.query('SELECT Id,CaseNumber FROM Case WHERE AccountId =\''+sc+'\' AND VIN_Entry__c =\''+ event.VIN__c+'\ AND Status!='Approved ' AND Status!='Closed' AND Status!='Denied'');
Thanks fir your response. I tried the llogic but it throws me errors
I trust you are doing very well.
Please use below approach:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks and Regards,
Khan Anas
Here is the error message for you to better understand. Thanks!
You are misplacing single quotes. Just copy paste below line of code. I have tested in my org and it is working fine.
Regards,
Khan Anas