We have a custom field on our Opportunity Product that is called IIS Cost and we would like for some Product records to be able to have this value defaulted from the PricebookEntry. For example I can default the Sales Price but not my IIS Cost.

Is this possible?

  • are you using out-of-box Opportunity product selection user interface 'Add product' button? If so, you can do this via workflows
    – cropredy
    Jan 21, 2015 at 20:41
  • Hi There, Yes we are using the out of box opportunity product items. We created a field called "Standard Cost" in the pricebook page layout. Thats where we want to put the default cost but we want this to pull through all the way through to the opportunity product with the ability to change it as needed. Just like the sales price. Can you help me with this workflow? Thanks. R- Jan 26, 2015 at 14:40

2 Answers 2


It is worth reviewing the schema between these SObjects: Opportunity, Opportunity Product, Pricebook Entry, Product2, Pricebook2

  1. Create a New Workflow on Opportunity Product
  2. Evaluate the rule only upon Creation
  3. Formula evaluates to true expression is simply true - that is, the WF runs every time an Opportunity Product is created
  4. Workflow Action is a Field Update of field IIS_Cost__c defined to be the value of (use Formula Value to set value) Opportunity.Pricebook2.standard_cost__c

This sequence works because before the Opportunity Product can be created, SFDC prompts for a Pricebook to assign to the Opportunity. Hence, when the workflow executes upon creation of the Opportunity Product, the lookup relationship from Opportunity Product -> Opportunity -> Pricebook2 exists, allowing you to select Standard_Cost__c

As IIS Cost is presumably a currency field, it can be edited by the user after the Opportunity Product is created.

Curiously, SFDC does not permit traversal of the relationship: Opportunity Product -> PricebookEntry -> Pricebook2 in a workflow field update formula.

Note also that I wold think that Standard Cost really belongs as a custom field on PricebookEntry or arguably, on Product2 as standard cost is associated with a SKU, not a pricebook - but I'm sure you know your application better than I.


we can create the formula field

  • How do you see a formula field entering a default value in another field, where the vaue should still be editable ? Dec 15, 2015 at 13:37

You must log in to answer this question.

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