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
Sonia GenesseSonia Genesse 

Auto update a lookup field with a Trigger on a Customer Object from Detail Objects

Hi Pcon
 
I realize after looking at the 2 additional Triggers needed, that they are a bit different. In these I would need to access the Detail object, not sure how to approach this.
 
Is this something you can help me with?
 
#1
I need to have the trigger update the Parts_Order_Line__c  (lookup) on the SVMXC__RMA_Shipment_Order__c object, the detail object is SVMXC__RMA_Shipment_Line__c the Line Number field = NAME.
 
Once populated both the Product__c and the Parts_Order_Line_Serial_Number__c (both formula text fields) would need to be populated.
 
The Order Number on the SVMXC__RMA_Shipment_Order__c object = NAME and on the detail object SVMXC__RMA_Shipment_Line__c = SVMXC__RMA_Shipment_Order__c

User-added image

#2
Need to have the trigger update the Work_Detail__c (lookup) on the  SVMXC__Service_Order__c object, the detail object is SVMXC__Service_Order_Line__c the Work Detail Line Number field = NAME, update where SVMXC__Line_Type__c (picklist)  = ‘Parts’
 
 
Once updated the Work_Detail_Part__c  (formula text field) would need to be populated.
 
The Work Order number (Service Order Number) on the SVMXC__Service_Order__c object  = NAME, the Work Order number on the detail object SVMXC__Service_Order_Line__c = SVMXC__

User-added image
User-added image

Thanks for any assistance you can provide!
 
Sonia
 
Best Answer chosen by Sonia Genesse
pconpcon
Sonia,

Since we're working on this here (https://developer.salesforce.com/forums/ForumsMain?id=906F00000005HQ0IAM) do you mind deleting this question?

All Answers

pconpcon
Sonia,

Since we're working on this here (https://developer.salesforce.com/forums/ForumsMain?id=906F00000005HQ0IAM) do you mind deleting this question?
This was selected as the best answer
Sonia GenesseSonia Genesse
Unable to delete message states "can't delete bcuz others are interested in this question"....sry!!
pconpcon
It's probably because I commented on it :/  Can you just mark the link to the other question as the answer to get it out of the open queue