You need to sign in to do that
Don't have an account?

trigger for creating child record based on parent record update
Hi Team,
I have 2 Objects, (Parent-abc__c & Child-CL__c) with loookup relationship.
There are 15 Picklist values in abc__c object.(eg: Country__c, State__c, Region__c, Gender__c.......)
There are 4 Fields in CL__c object(Old value, abc__c, NEW Value, action)
Now I want to create a child record(CL__c) if someone MODIFIES/UPDATES any of the 15 Picklist values.
The CL__c record must have the Old value as well as NEW value for user reference.
How to achieve this using trigger? any code samples? TIA
I have 2 Objects, (Parent-abc__c & Child-CL__c) with loookup relationship.
There are 15 Picklist values in abc__c object.(eg: Country__c, State__c, Region__c, Gender__c.......)
There are 4 Fields in CL__c object(Old value, abc__c, NEW Value, action)
Now I want to create a child record(CL__c) if someone MODIFIES/UPDATES any of the 15 Picklist values.
The CL__c record must have the Old value as well as NEW value for user reference.
How to achieve this using trigger? any code samples? TIA
Try this code:
Note: I have putted comments in code, update accordingly. Some update needed do from ur side.
If it helps you, Mark ur ans.
Thanks,
Niraj