You need to sign in to do that
Don't have an account?

Formula ISPICKVAL
I am trying to get current date, when any body select status picklist from deferred,declined or closed. I wrote the formula for it but the problem is when resolved date is set to current date but if I open that request after it is closed after two or three days , it is changing my date to current date ( New). The formula is below.
Resolved Date=
IF( OR(ISPICKVAL(Status__c ,'Declined - Business Lead (Closed)'),ISPICKVAL(Status__c ,'Declined - Change Control (Closed)'),ISPICKVAL(Status__c ,'Deferred - Business Lead (Closed)'),ISPICKVAL(Status__c ,'Resolved - CRM (Closed)')),TODAY(), null)
I closed one req on 14th April , resolved date field shows thevalue 14th April but if I open that req after two days the resolved date field change its value from 14th to 16th without doing anything. Please help me.
What you really want here is a Workflow Rule. Do this:
1. Create -> Workflow Rules
2. New Rule
3. Select Object, Name Rule
4. Evaluation Criteria: "created, and any time it’s edited to subsequently meet criteria"
5. Rule Criteria should be Status__c equals any of the 3 you named
6. Add Workflow Action -> Field Update
7. Name and Select the field that will contain the date
8. Use the today() formula for new field value
That should solve it.
All Answers
What you really want here is a Workflow Rule. Do this:
1. Create -> Workflow Rules
2. New Rule
3. Select Object, Name Rule
4. Evaluation Criteria: "created, and any time it’s edited to subsequently meet criteria"
5. Rule Criteria should be Status__c equals any of the 3 you named
6. Add Workflow Action -> Field Update
7. Name and Select the field that will contain the date
8. Use the today() formula for new field value
That should solve it.
Hi,
In formula field date is changing due to TODAY() and formula runs at the real time. So Everyday it will show Date of that day( TODAY).
Workflow is the approiate way to resolve it. You Can also write a short trigger at the time status change Update the Date field.
Trigger:
I have not tested trigger, concept is what I am posting. you can also write after trigger taking proper measure.
trigger updateResolvedDate on YourObject(before insert, before update){
if(Trigger.new[0].Status__c == 'Deferred - Business Lead (Closed)' ||
Trigger.new[0].Status__c == 'Declined - Business Lead (Closed)'' )|| your conditions ){
Trigger.new[0].ResolvedDate__c = Date.today();
}
}
Thank You very much.....
IF (ISPICKVAL( Number_of_Nights__c ,'1 Night'), '1',
IF (ISPICKVAL( Number_of_Nights__c ,'2 Nights'), '2',
IF (ISPICKVAL( Number_of_Nights__c ,'3 Nights'), '3',
IF (ISPICKVAL( Number_of_Nights__c ,'4 Nights'), '4',
IF (ISPICKVAL( Number_of_Nights__c ,'5 Nights'), '5',
IF (ISPICKVAL( Number_of_Nights__c ,'6 Nights'), '6',
IF (ISPICKVAL( Number_of_Nights__c ,'7 Nights'), '7',"")))