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
Roxana ShuppRoxana Shupp 

Updating data between Opportunity Line Items and Work Order Line Items

I am trying to update the Unit Cost for a product in Work Order Line Items from the Unit Cost in Opportunity Line Items (Products). I am relating them by the Product Code. I was hoping this would work on the Unit Cost field on the Work Order Line Item, but it doesn't:

If([OpportunityLineItem].ProductCode = Product_Code__c,[OpportunityLineItem].UnitPrice,"")

I even tried Workflow Field Updates and Process Builder with no success. I was wondering if anyone had a suggestion for me on how to do this. 
Thank you so much.

 
ShirishaShirisha (Salesforce Developers) 
Hi Roxana,

Greetings!

I do not think the WorkOrderLineItem and OpportunityLineItem are related to each other.So,I would suggest you to check,if you have any lookup relationships otherwise,create one to update the UnitPrice based on the other.

Reference:https://trailblazers.salesforce.com/answers?id=9063A000000DkvxQAC

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Roxana ShuppRoxana Shupp

Hi Shirisha,
 

Thank you for the fast reply. And the great info. I am going to work on this and let you know how I make out.

Thank you thank you
Rox