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
Laura Babb 4Laura Babb 4 

update custom opportunity field from opportunity line item quantity

I am trying to create a process builder that triggers when a specific product is added to an opp. I want the Quantity sold for that specific product to go into a custom field on the opportunity record. I feel like this should be very straightforward:
1. Process is on Opportunity Product object
2. Criteria is that the product id = "specific product id"
3. immediate action is a field update on opp record related to the opp product record and is a formula field to fill in the value for  OpportunityProduct.Quantity.

This is not firing though. The field on my opp record remains blank. What am I missing here?
NagendraNagendra (Salesforce Developers) 
Hi Laura,

Sorry for this issue you are facing.

You should not filter on hard-coded Id values. Filter on the name of the product or a unique identifier instead. It may not fix your issue, but it is very important you not leave your criteria node the way it is.

Thanks,
Nagendra
Laura Babb 4Laura Babb 4
Thanks – I modified that. Can you briefly tell me the issue with using the ID? I assumed that was the best unique identifier to use! I will not moving forward though, so thanks so much. As far as the solution, I changed the field update to a field reference versus the formula I had and it updates now. Thanks, Laura