1

This would be first my batch apex and need urgent help with batch apex code

The requirement is, if

(Account: NC EQUALS True) // This is checkbox field

AND

(Account: Status EQUALS Active) // Status field on Account

AND

(Case: Case Record Type EQUALS NC Action Plan) // NC Action Plan is a record  type on case

Then, Create a Task which would be on Case Object (Owner is CaseOwner) . Till here , everything worked fine with Workflow. But, this workflow rule should every year on Anniversary (Anniversary is field on Account)

Please help me to achieve this using Batch Apex and scheduler.

7
  • 1
    Why not add a Date type formula field to the Case object to grab the value of the Anniversary off the Account and use that to drive a time-dependent workflow rule?
    – martin
    Commented Oct 18, 2016 at 13:13
  • Didn't got your statement. Just to add workflow rule should recurs every year on Anniversary
    – JJoseph
    Commented Oct 18, 2016 at 13:18
  • 1
    Right, you won't see the account dates as options under "Add Time Triggers". What it sounds like you need to do is create a formula field on the case that has the same value as the Account's Anniversary date.
    – martin
    Commented Oct 18, 2016 at 13:22
  • 1
    Once you go to Setup > Build > Customize > Cases > Fields > New > Formula > Date , the formula is just the name of the Anniversary field. Something like Account.Anniversary__c
    – martin
    Commented Oct 18, 2016 at 13:34
  • 1
    If you go to the workflow and find the "Add Time Triggers" section, you should see the field there.
    – martin
    Commented Oct 18, 2016 at 13:40

0

You must log in to answer this question.

Browse other questions tagged .