7 Antworten
Steps :
1) Create a cusom field 'Lead Progress Color' which would store whether color is green or Red.
2) Create a workflow Rule where entry criteria is like this :
OR(ISNEW(),ISCHANGED(Status))
3) Write a field update which has the following Action :
Any Status change from Closed- Not Converted is considered as Green and any status change from Closed - Converted to other status is considered as red. Other progress rules apply as they should.Case(Status,
'Open - Not Contacted', IF(ISPICKVAL(PRIORVALUE(Status),'Closed - Not Converted'),'GREEN','RED'),
'Working - Contacted', IF(OR(ISPICKVAL(PRIORVALUE(Status),'Open - Not Contacted'),ISPICKVAL(PRIORVALUE(Status),'Closed - Not Converted')),'GREEN','RED'),
'Closed - Converted',IF(OR(ISPICKVAL(PRIORVALUE(Status),'Open - Not Contacted'),ISPICKVAL(PRIORVALUE(Status),'Working - Contacted'),ISPICKVAL(PRIORVALUE(Status),'Closed - Not Converted')),'GREEN','RED'),
'Closed - Not Converted','RED',
'GREEN'
)
4) Create a formula field which would check the value of custom field 'Lead Progress Color'.IMAGE(
CASE(ltcmp__Lead_Progress_Indicator__c ,
"GREEN", "/img/samples/flag_green.gif",
"RED", "/img/samples/flag_red.gif",
"/img/samples/flag_green.gif"),
"PROGRESS FLAG")