0

we have created a CustomObject MonthlyItem as child of Contract (Master/Detail Relationship). Now we want to generate new MonthlyItems at the end of each month for the next respective month.

Something like:

For each active Contract
   Create a new MonthlyItem for the contract
     Field-Begin: 1/next-month/this-year
     Field-Budget: some-contract-field

What is the preferred technology for this Task?

1

The above scenario can be implemented using batch apex.

Also you need to implement scheduled apex to run the batch class at the end of month.

  • thank you - is Apex is the only solution or are flows / workflows also an option? – hotzen Jul 8 '16 at 13:58
  • Using flows we can create time based action only if there is a DML on the record. For this requirement scheduled apex is the solution. – C0DEPirate Jul 8 '16 at 14:11

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.