You need to sign in to do that
Don't have an account?
SF Beginner 2019
How to Create a trigger/Process builder wherein if a record from opportunityline item was deleted it will create a record?
I am planning to create a history or audit trail on Opportunity Product or Line Item, I am currently stuck in deleting and creating a history when deleted, can it be done using the process builder wherein when a record is deleted it will create a record on opp prod history object. I have created update and create, how can I achieve these on delete and if it is in apex how can I achieve these?
Process Builder for delete doesnt work at this stage
https://success.salesforce.com/ideaView?id=08730000000DlPBAA0
Going to Trigger, here is an example of trigger and handler that works on updates and deletes
This particular example updates a field on the parent with a count, so you should be able to extrapolate/modify to solve your challenge.
Trigger Handler
Regards
Andrew