You need to sign in to do that
Don't have an account?
snovvblind
Creating a record in an unrelated object using Triggers
I'm a quick learner. I'd just like help this one time, and I'll pick up on the material pretty quickly.
Here's the business logic, I'd like:
- Check whether a date on a field on the Inventory Object is equal to or greater than today().
- If its equal to or greater than today(), create a record in an unrelated custom object (Tasks Object), and insert a whole bunch of pre-populated fields
- Upon creation of this new record in the Tasks Object, if I set the status field to "Done", I'd like another trigger to first increment a number field in the Inventory Object.
- Delete the Tasks Object that was created, after the increment to the Inventory Object is completed.
If you could help, that'd be great.
Well, I got this far, but I really need some help:
Error:Apex trigger CreateNewRecurring caused an unexpected exception, contact your administrator: CreateNewRecurring: execution of BeforeUpdate caused by: System.SObjectException: DML statment cannot operate on trigger.new or trigger.old: Trigger.CreateNewRecurring: line 13, column 1
Yep, dually noted.
I fixed it with the following code:
https://bossnhacai.me (https://bossnhacai.me)