Print this page

Work Order Line Items Syncing with Price Books in Winter 17

Knowledge Article Number 000247070

If you’re using the pricing features on work orders, you’ll know that you can associate a price book with each work order, and price book entries (products) to each of the work order’s line items. For example, you can associate your “Standard Price Book” with a particular work order, and create three line items on the work order which correspond to Product A, Product B, and Product C as listed in the price book.

Previously, it was possible for the PricebookEntryId and Product2Id fields on a work order line item to get out of sync. This could happen if a user selected a pricebook entry, then selected a product that didn’t correspond with that pricebook entry.

In Winter ’17 (API version 38.0), filling out the PricebookEntryId field automatically populates the corresponding Product2Id field, which is read-only to preserve the integrity of your data. We also made the following changes to price-related fields on work order line items:


  • The PricebookEntryId field is now editable, and its label in the user interface changed from Pricebook Entry to Product for clarity.
  • The Product2Id field is now read-only, and can’t be added to page layouts or updated via the API.
  • When you select a product on a work order line item, the product must be included in the parent work order’s price book. If the work order doesn’t list a price book, you cannot add products to its line items.

If you weren’t using the pricing fields, including Product, on work orders before Winter ’17, these changes don’t affect you.

This information is also available in the Winter '17 Release Notes.

If you were using the pricing fields on work orders before Winter ’17, we recommend taking the following steps:


1. Update to API version 38.0 to keep your data in sync.
2. If you’ve written custom code or apps that reference the Product2Id field on work order line items, update your code to reference the PricebookEntryId field instead.
3. If you need the Product2Id field on work order line items to be editable, consider creating a custom Visualforce page based on API version 37.0.
4. Check your work order line item page layouts to make sure they contain the Product field (whose API name is PricebookEntryId) so you can continue associating work order line items with products.

This table explains how existing work order line items are affected when you upgrade to API version 38.0 (Winter ’17). In some cases the Product field must be updated manually.
Line item data before Winter '17When a line item is updated in Winter '17
Line item correctly lists a product and corresponding price book entry.The Product field lists the original product.
Line item lists a product, but not a price book entry.The Product field is blank.
Line item lists a product and a price book entry, but the price book entry corresponds to a different product.The Product field lists the product that corresponds to the original price book entry.
Line item’s price book entry belongs to a different price book than the one listed on the parent work order.The user is prompted to select a product that is included in the parent work order’s price book.


promote demote