0

I need your assistance asap. I am trying to write a workflow rule (or trigger, or process flow,etc.).

I need a workflow that recognizes a change in a field on a Customer Account record and depending on the change, updates the account type to Prospect.

The scenario is this:

1.) There is a nightly batch job that runs and feeds 3 fields on the account record with a number. There is also a formula field that sums these 3 fields called Total Fleet#. This field is the one I will be using for this scenario. 2.) Before the batch job runs, there is another job that zeroes out the fields. So the Fleet Total# before job = 7, Fleet Total# after job = 0. 3.) The next batch job then fills in the values again. 4.) If the new values equal 0 after the batch job and had a non-zero value originally, we need the workflow to update the account type to Prospect.

So basically, when the fleet total field is 0, the account is a prospect.

The problem is that all of the accounts will turn to 0 because of the first batch job. So I need a way to flag these accounts and have the workflow kicks in AFTER the second batch job.

I hope you can follow this! If not, let me know and I will try to explain in another way.

Thanks so much for your help!

Shannon

  • it sounds like the solution you are solving for is when fleet number is changed from > 0 to 0 then update to prospect. Can you confirm? – zainogj Feb 12 '16 at 18:08
  • Actually, I think what I am trying to say is if it goes from >0 to 0 and then STAYS 0, change to prospect. – ShannonA Feb 12 '16 at 18:14
0

Though I am not completely sure of why do you need a batch job to set it to 0, here is what I would propose that may work for you.

Use one more dropdown or a checkbox(let's say All_Batch_Processing_Complete__C) and update it False after your first job runs and set it to true after the second job updates the actual Fleet size. And update your workflow rule criteria to fire only when the value of All_Batch_Processing_Complete__C is true. Hope this helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.