Quote Line Item

Requirement 1:-I need to add custom field Product_Services__c picklist

Requirement 2:-I need to show picklist values based on Product.If product A then Picklist Values P1,P2,P3.IF product B then P3,P4,P5.

Please suggest How can i achieve these 2 requirements.

  • 3
    -1 from me because this sounds like a 'do my work for me' request. I don't see any attempt at research here. – Derek F Nov 30 '16 at 18:35

tl;dr version:

I don't think what you're asking for is feasible, and you (or your manager) need to rethink your requirements (as well as doing some independent research).

long version:

This is a lot more work than I think you think it is.

The page that you're working with is quoteitm/multilineitem.jsp. It's a standard UI that Salesforce provides, but doesn't allow you to tinker around with too much.

There is this help article which outlines how to add a field to the multilineitem.jsp page for Opportunity Line Items. The process is identical for adding fields to the same page for Quote Line Items.

  1. From the object management settings for opportunity products, go to Page Layouts.
  2. Next to the name of an opportunity product page layout, click Edit.
  3. Click Edit Multi-Line Layout.
  4. Move fields between Available Fields and Selected Fields.

    • To customize which fields display in the layout, select one or more fields in Available Fields and click Add or Remove.
    • To sort fields in the layout, select one or more fields in Selected Fields and click Up or Down.
    • To select multiple fields individually, use CTRL+click.
    • To select multiple fields as a group, use SHIFT+click.
  5. Click Save to apply your changes.

That can get your picklist onto the page, but I believe that making your picklist dependent on product name is out of reach. If you have a controlling field for a picklist, it must either be a checkbox field, or another picklist field.

For that, you'd need to make a custom controller or controller extension and manually create & maintain the dependency logic (which is well beyond the scope of your question). This also means that you'd need to override multilineitem.jsp, which is another nightmare altogether.

| improve this answer | |

Requirement 1: simply create a picklist field.

Requirement 2: Do these picklist values need to vary based on product, or based on type of product? If its the latter, you could simply create a handful of record types on the Product object, and then define separate picklist values for each record type.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.