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
Rachel LinderRachel Linder 

Opportunity Product Linte Item Field History Tracking

We currently use Opportunity Products for all our opportunities. I know that we currently cannot track changes on the opportunity product fields. I have seen posts about using APEX code for this. Is there something that someone has already created to do this or someone who could help me with getting this created?
Thanks.
R-
Hargobind_SinghHargobind_Singh
I won't be able to help you with the code, but if you do want to write it, you can create a simple table, with ID, FieldName, OldValue, NewValue, and write a trigger that can detect the field-changes using trigger.oldMap for fields that you want to track history for, and then insert records to this table.