+ Start a Discussion
Nevin O'Regan 3Nevin O'Regan 3 

Trigger that links two records when custom Id field is updated

Hi guys,

I have created a custom object which is being updated with data from and external system. Data is being pulled from the OpportunityLineItemSchedule object to the external system, which then returns the Sales Order number back into the related OppLineItemSch record in Salesforce
The custom object is simply called Pronto__c. I have also created a custom field on this object called OppLineItemSchId__c which is the Id of the related OppLineItemSch record. I also have a lookup field on the OppLineItemSchedule object which looksup Pronto__c.
What I am trying to do is create the relationship between the Pronto__c record and the OpportunityLineItemSchedule record once the Pronto.LineItemScheduleId__c field matches the OpportunityLineItemSchedule.Id field.