You need to sign in to do that
Don't have an account?
Nevin O'Regan 3
Automatically Relate Child Objects To Parent Object Based On Criteria
I am looking for some help with a trigger.
I have created a custom object Sales_Order_Line__c which has a Parent Object Exchange_Rate__c. In Sales_Order_Line__c there is a date field called Shipment_Date__c and in the Exchange_Rate__c object there are two date fields called Start_Date__c and End_Date__c.
If the Shipment Date falls within the Start Date and End Date of the Exchange_Rate__c object I would like it to automatically relate to this object.
Can anyone help me with this?
I have created a custom object Sales_Order_Line__c which has a Parent Object Exchange_Rate__c. In Sales_Order_Line__c there is a date field called Shipment_Date__c and in the Exchange_Rate__c object there are two date fields called Start_Date__c and End_Date__c.
If the Shipment Date falls within the Start Date and End Date of the Exchange_Rate__c object I would like it to automatically relate to this object.
Can anyone help me with this?
Please check once below sample code :
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For SFDC Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
I have tried your code and I'm getting a bunch of errors.