How to track of the number of times a case-status is flipped to 'Kickback'

31 views
Skip to first unread message

Srinivas

unread,
May 16, 2013, 1:39:05 AM5/16/13
to salesforce-p...@googlegroups.com
Hi all,

Can anyone help me with the solution

I have Status and Queue picklist Fields.
Kickback is the value in the Status field and APAC is the value in the Queue field.My requirement is
As APAC user I would like to keep track of the number of times a case-status is flipped to 'Kickback'.Every time the case status is flipped to Kickback status from any other status value, the 'Kickback counter' field must be automatically increased by 1. and it should save in a Seperate field Kickback Counter.

Thanks
Sri

RB Chowdary

unread,
May 16, 2013, 2:10:53 AM5/16/13
to salesforce-p...@googlegroups.com
Hi Srinivas,
You can do this by using Workflow Field Update. 

Create a Rule like Status = "Kickback" and Queue="APAC" and male Evaluate the rule when a record is: "created, and any time it’s edited to subsequently meet criteria".

Make your Kickback Counter field type as Number.
And for above rule create a Field Update like,

Inline image 1




--
You received this message because you are subscribed to the Google Groups "salesforce professionals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salesforce-profess...@googlegroups.com.
To post to this group, send email to salesforce-p...@googlegroups.com.
Visit this group at http://groups.google.com/group/salesforce-professionals?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Thanks & Regards.
Ravindra Babu Nagaboina


Salesforce.com Certified Force.com Developer
Hyderabad
image.png

Charan Vuyyuru

unread,
May 16, 2013, 2:14:55 AM5/16/13
to salesforce-p...@googlegroups.com

Fantastic reply ravi.

image.png

Srinivas Yalamanchili

unread,
May 16, 2013, 3:32:04 AM5/16/13
to salesforce-p...@googlegroups.com, ravi.na...@gmail.com
Hi Ravi,

Thank you for the solution.
One more question
Whether we can write Trigger to accomplish this one?

Thanks
Srinivas
image.png

Charan Vuyyuru

unread,
May 16, 2013, 4:43:06 AM5/16/13
to salesforce-p...@googlegroups.com

Yes we can do this wth a trigger as well.

image.png

Srinivas Yalamanchili

unread,
May 16, 2013, 6:42:00 AM5/16/13
to RB Chowdary, salesforce-p...@googlegroups.com
Thanks Ravi.Which one will be better?

Thanks
Srinivas

On Thu, May 16, 2013 at 1:17 AM, RB Chowdary <ravi.na...@gmail.com> wrote:
Yes, we can.
image.png

Srinivas Yalamanchili

unread,
May 16, 2013, 6:42:55 AM5/16/13
to salesforce-p...@googlegroups.com
Thanks Charan.
Which one be the best option?

Thanks
Srinivas
image.png

RB Chowdary

unread,
May 16, 2013, 7:27:00 AM5/16/13
to salesforce-p...@googlegroups.com
WF is simple and easy to implement.
image.png

Srinivas Yalamanchili

unread,
May 16, 2013, 7:28:27 AM5/16/13
to salesforce-p...@googlegroups.com
Thanks Ravi

Srinivas
image.png

Himanshu Kalyan Kar

unread,
May 20, 2013, 4:23:27 AM5/20/13
to salesforce-p...@googlegroups.com
Hi Srinivas,
Create a formula field for "Kickback counter" and write the below formula.
if (Queue="APAC" && Status = "Kickback" && Ischanged(Status), status_counter +1, status_counter)

himanshu
image.png

Dan Leibowitz

unread,
May 20, 2013, 1:47:36 PM5/20/13
to salesforce-p...@googlegroups.com
Sorry to be jumping in late to this one, and maybe I don't understand what Kickback refers to, but there is an app that tracks the time that a case spends on the customers side as opposed to the time the case spends on the help desk side.  Sounds like the same thing you are building out.
image.png

Srinivas Yalamanchili

unread,
May 20, 2013, 3:15:26 PM5/20/13
to salesforce-p...@googlegroups.com, karhi...@gmail.com
Hi Kalyan,

Thanks for the solution
I tried to add formula field.But its giving the below error
Error: Field Queue__c is a picklist field. Picklist fields are only supported in certain functions. 

Thanks
Srinivas
image.png

Srinivas Yalamanchili

unread,
May 20, 2013, 3:16:22 PM5/20/13
to salesforce-p...@googlegroups.com
Hi,

Kickback is a picklist value in Status field.

Thanks
Srinivas
image.png

Srinivas Yalamanchili

unread,
May 22, 2013, 12:30:37 AM5/22/13
to Himanshu Kalyan Kar, salesforce-p...@googlegroups.com
Hi,

Thanks for the solution.
I am getting this error
Error: Function ISCHANGED may not be used in this type of formula.I think ISCHANGED is used to compare 

Thanks
Srinivas

On Tue, May 21, 2013 at 9:09 PM, Himanshu Kalyan Kar <karhi...@gmail.com> wrote:
Hi Srinivas,
You should incorporate IsPickVal function for Picklist fields.

if (IsPickval(Queue,'APAC') && IsPickVal(Status ,'Kickback') && Ischanged(Status), status_counter +1, status_counter)

Now check it and let me know.
--
himanshu

image.png

Srinivas Yalamanchili

unread,
May 22, 2013, 3:43:27 AM5/22/13
to Himanshu Kalyan Kar, salesforce-p...@googlegroups.com
Sure  i will try

Thanks
Srinivas

On Wed, May 22, 2013 at 12:32 AM, Himanshu Kalyan Kar <karhi...@gmail.com> wrote:
Yes,
I also checked. We can not use that function in formula field, but we can use in workflow or validation rule.

Then write few code in Trigger.
Trigger Code
    ============
    Trigger evaluationCounter on Employee__c (before Update){
   
        Employee__c[] oldList = Trigger.Old;
        Employee__c[] newList = Trigger.New;
       
        for(integer i = 0; i < newList.size() ; i++){
            if(newList[i].Queue == 'APAC' && newList[i].Status == 'Kickback' && newList[i].Status <> oldList[i].Status)
               newList[i].status_counter = (newList[i].status_counter == null) ? 1 : newList[i].status_counter + 1;
        }
    }

Check it..definitely work.
--
himanshu

image.png

Himanshu Kalyan Kar

unread,
May 22, 2013, 3:32:13 AM5/22/13
to Srinivas Yalamanchili, salesforce-p...@googlegroups.com
Yes,
I also checked. We can not use that function in formula field, but we can use in workflow or validation rule.

Then write few code in Trigger.
Trigger Code
    ============
    Trigger evaluationCounter on Employee__c (before Update){
   
        Employee__c[] oldList = Trigger.Old;
        Employee__c[] newList = Trigger.New;
       
        for(integer i = 0; i < newList.size() ; i++){
            if(newList[i].Queue == 'APAC' && newList[i].Status == 'Kickback' && newList[i].Status <> oldList[i].Status)
               newList[i].status_counter = (newList[i].status_counter == null) ? 1 : newList[i].status_counter + 1;
        }
    }

Check it..definitely work.
--
himanshu
image.png

Himanshu Kalyan Kar

unread,
May 22, 2013, 12:09:48 AM5/22/13
to Srinivas Yalamanchili, salesforce-p...@googlegroups.com
Hi Srinivas,
You should incorporate IsPickVal function for Picklist fields.

if (IsPickval(Queue,'APAC') && IsPickVal(Status ,'Kickback') && Ischanged(Status), status_counter +1, status_counter)

Now check it and let me know.
On Tue, May 21, 2013 at 12:45 AM, Srinivas Yalamanchili <yalamanchi...@gmail.com> wrote:



--
himanshu
image.png
Reply all
Reply to author
Forward
0 new messages