I have a custom field (Text) on each Product called Production Code. I need for that field's data to be entered and editable in a custom field (txt) on Quote Line Item. The Production Code copied over from each Product is only 1/3 complete as needed for a completed quote. The rest of the production code is determined and then entered on the fly for on each line item during the quote build process.

I've tried any number of formulas to pull the data (e.g., $PricebookEntry.PRODUCTION_Code__c) into a custom Line Item field to no avail. Not sure how Opp Product may play into the mix. All items are in a single pricebook and a single currency.

I've looked into custom settings, a trigger or even a new VF page but can't ferret out a good solution. I don't have a good criteria with which to choose a particular route.

The Production Code value on the actual Product page should not change as a result of being edited on a Quote line item field.

The Product page's Production codes are generally static, but do get updated on occasion. Therefore, the need is that the Quote line item's production Code field should either be copied as added to a line item as they are selected, or batch refreshed globaly when a change is made on the original (Product) production code custom field.

You guys rock

  • Thank G - but no luck. Error: Field $Product2.ProductCode does not exist. I can see that it does exist as a standard Product field. I am entering this on a custom text field's formula field under Opportunity Product, fields.
    – Bart__c
    Commented Feb 5, 2013 at 4:15
  • To Clarify - there are not 2 sets of codes. Just one per product. I just need those codes to present and be editable on a quote line item.
    – Bart__c
    Commented Feb 5, 2013 at 4:26
  • Turns out - ProductCode is not a standard object on opp line item - goo.gl/aCyfC
    – Bart__c
    Commented Feb 5, 2013 at 6:39
  • You should not be entering this into the default value of the field. I am saying to create a new formula field that concatenates the productcode and the line item code. The users will not be able to modify the first part of the code (the productcode). They will just enter the line item code. Commented Feb 5, 2013 at 14:00
  • ProductCode is not a field on the opp line item but you can still add it to the layout. go to the edit page for the opp line item/quote line item layout -> Edit multi line layout. You will be able to drag product code over. Commented Feb 5, 2013 at 14:04

1 Answer 1


Assuming that you can use a formula to concatenate the product code and quote code you can do this without any custom code.

  • Add a custom text field for users to enter the quote portion of the code and add it to your multi-line layout.
  • Create a formula to concatenate the product code and the quote code the users have entered: Product2.ProductCode + quote_code__c

I would recommend using the standard ProductCode field to store the "production code" as you cannot add custom product fields to the quote item multi-line layout.

If you need the full concatenated code to remain the same when the product code changes you can just change this to a workflow rule that runs on create.

  • Here's what I did, which I now realize you may have been suggesting all along ;). I made a empty text field on OppProd allowing for on-the-fly entry. Then a concatenated formula field to join ProdCode and this new field resulting in a new Total Production Code field.
    – Bart__c
    Commented Feb 5, 2013 at 20:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .