You need to sign in to do that
Don't have an account?
Selvakumar Anbazhagan 7
Need to convert from formula to SOQL Query
Hi Everyone,
I have a opportunity formula. I need to convert it into a SOQL Query.When i have tried it it throws me parsing error.
Can anyone help me on this.
My Opportunity formula is :
AND(
AND(
ISBLANK(Last_Stage_Change__c),
NOW() - LastModifiedDate > 30,
Probability < 0.91,
Probability > 0.01
),
AND(
NOW() - Last_Stage_Change__c > 30,
Probability < 0.91,
Probability > 0.01
)
)
I have tried this Query as
select Id,Name,StageName,LastModifiedDate,Last_Stage_Change__c from Opportunity where
where Last_Stage_Change__c == null and TimeSinceLastModified__c > 30 and TimeSinceLastStageChange__c > 30 and Probability < 91 and Probability > 1
Please any one assist me on this.
Thanks in advane.
I have a opportunity formula. I need to convert it into a SOQL Query.When i have tried it it throws me parsing error.
Can anyone help me on this.
My Opportunity formula is :
AND(
AND(
ISBLANK(Last_Stage_Change__c),
NOW() - LastModifiedDate > 30,
Probability < 0.91,
Probability > 0.01
),
AND(
NOW() - Last_Stage_Change__c > 30,
Probability < 0.91,
Probability > 0.01
)
)
I have tried this Query as
select Id,Name,StageName,LastModifiedDate,Last_Stage_Change__c from Opportunity where
where Last_Stage_Change__c == null and TimeSinceLastModified__c > 30 and TimeSinceLastStageChange__c > 30 and Probability < 91 and Probability > 1
Please any one assist me on this.
Thanks in advane.
Are all these fields part of the opportunity object?
Also are they of certain types - like they have to be numbers:
and TimeSinceLastStageChange__c > 30 - has to be a number
and Probability < 91 - has to be a number
and Probability > 1 - has to be a number
Thx