function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kevin LovellKevin Lovell 

Is it possible to create a trigger that will re-establish a revenue schedule when a field is updated?

I have a trigger currently set up that will schedule out the revenue per month when an opportunity is created.  The schedule is ran off of 2 custom opportunity fields (Services Sales Price and Services Term (mo.)).  I would like to create a trigger that re-establishes the revenue schedule when one of these two fields is edited.  Is this possible?
Mudasir WaniMudasir Wani
Hi Kaven,

Yes it is possible you need to use old and new map.
Let me know if you need any help.

Mark it as solution if this solves your problem
Hargobind_SinghHargobind_Singh
I thnk the answer is Yes. Here is a related post that might help: 

https://developer.salesforce.com/forums/ForumsMain?id=906F00000008zMqIAI
 
Kevin LovellKevin Lovell
Hi Mudasir & Hargobind,

Thank you for your responses.  I have seen the related post before.  I actually used it to create the initial trigger that runs when an opportunity is created.  Could this trigger be used to re-establish a revenue schedule that has already been created for a product?  If so, how would I do that and what code would need to be replaced in the related post?  Mudasir, would you be able to help me with this change?

Thanks,

Kevin
Kevin LovellKevin Lovell
Hi Guys,

I have tried to set up a trigger using the old map, new map concept, but I have had no luck.  Can either of you assist me?

Kevin