You need to sign in to do that
Don't have an account?
SFDC n12
SOQL Query Help needed
Hi,
I need help on the following requirement to write a SOQL Query
1) I am having 4 picklist fields as follows
ADR MONTH, ADR MOVE FROM MONTH, ADR YEARS, ADR MOVE FROM YEARS
ADR MONTH and ADR MOVE FROM MONTH represents the month picklist values from 01 to12
ADR YEARS AND ADR MOVE FROM YEARS represents years from 2013 to 2020
My requirement is when i enter the value for the above picklist fields
eg: ADR MONTH i select todays month (10/2014) and ADR FROM MONTH i select (9/2013) exactly 13 months then i have another field called as
Executive Approval Reasons which should be set as "Yes"
if i select ADR MONTH as todays month (10/2014) and ADR FROM MONTH as (8/2013) which is less than 13 months then the picklist field
Executive Approval Reasons which should be set as "No"
Help me how to achieve this
Thanks in Advance
I need help on the following requirement to write a SOQL Query
1) I am having 4 picklist fields as follows
ADR MONTH, ADR MOVE FROM MONTH, ADR YEARS, ADR MOVE FROM YEARS
ADR MONTH and ADR MOVE FROM MONTH represents the month picklist values from 01 to12
ADR YEARS AND ADR MOVE FROM YEARS represents years from 2013 to 2020
My requirement is when i enter the value for the above picklist fields
eg: ADR MONTH i select todays month (10/2014) and ADR FROM MONTH i select (9/2013) exactly 13 months then i have another field called as
Executive Approval Reasons which should be set as "Yes"
if i select ADR MONTH as todays month (10/2014) and ADR FROM MONTH as (8/2013) which is less than 13 months then the picklist field
Executive Approval Reasons which should be set as "No"
Help me how to achieve this
Thanks in Advance
Say your fields are on Account object, if it is not then change the Object API name :
for(Account acc : [ Select Id, ADR_MONTH__c, ADR_FROM_MONTH__c From Account Where ADR_MONTH__c !=: NULL AND ADR_FROM_MONTH__c !=: NULL] ) {
// do calcualtions for month difference from acc instance and do your actions
}
All Answers
Say your fields are on Account object, if it is not then change the Object API name :
for(Account acc : [ Select Id, ADR_MONTH__c, ADR_FROM_MONTH__c From Account Where ADR_MONTH__c !=: NULL AND ADR_FROM_MONTH__c !=: NULL] ) {
// do calcualtions for month difference from acc instance and do your actions
}
I also have another query which i need ur help
I am having a approval process which is having 4 stages of approver
i want to capture the comments enterd by the 3 level of approver alone (not any other apperover) in a custom field
Help me how to achieve it
Thanks in Advance