You need to sign in to do that
Don't have an account?
computing cloud
How to add conditions in a Batch class when their are n no of clause
I would like to add few condition in the query,how to add them.Any Suggestion please.
1) Add more roles (such as EB ,TA ,RA etc where role is a picklist field) in this query .
1) Add more roles (such as EB ,TA ,RA etc where role is a picklist field) in this query .
SELECT Contract__c FROM Contract_role__c WHERE Role__c = 'SA'2)In getquerylocator , add few condition such as
When "Renewed" is Checked AND When "SRR" is YES AND when the "Status Renewed" is equal to "Status renewed for next quarter " or "Pipeline" AND when "Status Renewed next Year" is not equal to "Renewed" or"Renewed lost"i have the query as
return Database.getQueryLocator('Select id, Contract_Name__c , EndDate ,ownerId FROM Contract WHERE Id IN: setContractIds');When i try in developer console , it executes and gives the output ,but when i use in getquery locator the output does not comes ...
Select id, Contract_Name__c , EndDate ,Renewal_Status__c FROM Contract where Status Renewed IN ('Status renewed for next quarter','Pipeline') OR Status Renewed next Year IN ('Renewed','Renewed lost')Any help very much appreciated.
2. You can just add these clauses to the query.
What are you expecting to receive fromt he getQueryLocator() call? This will return a QueryLocator class that you can then iterate at a later point in time.
I tried adding the clause to the query but no luck .Basically i have a batch class ,which sends an email notification 100 days before the contract end date to customer.Which was working fine when we were using this query . Now we have few changes in the requirement ,to add few conditions so when i started adding the condition ,the code got saved but the email notification is not going to the customer. Batch Class : Any help very much appreciated.
For Example : The Scenario is when the renewable product is checked ,then only the email notification is to be sent before 100 days of the contract end date.When i create an record i dont find the field on the edit page (as we know its an read only field) but how to make it checked .Do i need to do some field update or any formula where the value gets updated.
Any suggestion please.