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

Updating a date field on an object
Hi, I am stuck on the following problem statement:
I have Asset , Invoice_Line_Item__c and Invoice__c objects.
I need to write a trigger on Invoice__c in which :
if Delivery_Date__c field on Invoice__c is updated , Delivery_Date__c field on corresponding Asset as well as Delivery_Date__c on Invoice_Line_Item__c should also be updated with the same and a checkbox field labeled - 'Updated?' should be checked.
Note - Asset field has a lookup on Invoice__c .
Also, Invoice and Invoice_Line_Item have a Master Detail relationship between them.
I have Asset , Invoice_Line_Item__c and Invoice__c objects.
I need to write a trigger on Invoice__c in which :
if Delivery_Date__c field on Invoice__c is updated , Delivery_Date__c field on corresponding Asset as well as Delivery_Date__c on Invoice_Line_Item__c should also be updated with the same and a checkbox field labeled - 'Updated?' should be checked.
Note - Asset field has a lookup on Invoice__c .
Also, Invoice and Invoice_Line_Item have a Master Detail relationship between them.
Regards
Andrew
Please use below code:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.