Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Customize Price List Item Look-up View

(1) ShareShare
ReportReport
Posted on by

I have a scenario where I need to customize Price List Item Look-up view.

Dy default the '+' to add Existing Product shows a default Lookup view which has multiple unwanted columns. To overcome this I created a new view in Price List Item with required columns but not able to set this view as default to my lookup. 

4863.1.PNG

7043.2.PNG

5850.3.PNG

I checked Opportunity form and I couldn't find any Price list item view mentioned there.

Anybody knows how to set this.

Any help is appreciated.

*This post is locked for comments

  • Anh Luu Profile Picture
    215 on at
    RE: Customize Price List Item Look-up View

    I have the same issue.

    Have anyone had the solution for this problem yet?

  • Community Member Profile Picture
    on at
    RE: Customize Price List Item Look-up View

    I met the same issues as you. I want to add a column to Product Pirce List - Price List page. But i don't know how to do.Waiting the help. thanks.

  • Community Member Profile Picture
    on at
    RE: Customize Price List Item Look-up View

    I tried to implement your second option but dont know how to get Lookupfiled ID.

    Xrm.Page.getControl("LookupFieldID").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true); // You need to replace lookup field Id

    I am able to find other lookup filed ids in different form but in this scenario i am not able to get this field id through form editor as it is not shown in Opportunity/Opportunity Product form.

    Could you please help me how to get lookupfiled id to add custom view.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Customize Price List Item Look-up View

    Hi ,

    did you try my second option I am sure  it will work  . Try to implement . I did for security role lookup which also system entity without any issue.

    Thanks

    Goutam

  • Community Member Profile Picture
    on at
    RE: Customize Price List Item Look-up View

    Hi Goutam Das, thanks for the reply.

    Customizing "Price List Items in Entity Price List" is not possible as it permits only limited customization.

    Also in my case i need to show a specific view with filter conditions so that only required products will be shown to the user.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Customize Price List Item Look-up View

    Hello,

    Did you tried with this by going to  setting -> Customization --> PricelistItem --> Views --> got to "Price List Items in Entity Price List" --> Add/Edit columns -> Publish All Customization .

    Second option you can do by writing below script.- 

    Just consume this function onload and Onchange  of your form and field. Change as per your required attributes and field name.

    function SetLookUpView() {

    var viewId = "{BE653221-C406-4DD1-BC80-52EC2420BDBA}"; // View Id will be the same , However you can get easily get viewID by going to setting -> Customization --> PricelistItem --> Views --> doubleclicj on view --> press F11 window willl maximize and copy the url from top. find the ID ( &id=%7bBE653221-C406-4DD1-BC80-52EC2420BDBA%7d the id will be without %7b ---Id --- %7d)
    var entityName = "productpricelevel";
    var viewDisplayName = "Price List Items in Entity Price List";

    var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
    "<entity name='productpricelevel'>" +   // Need to retrieve what field you want to retrieve
    "<attribute name=' productnumber'/>" +
    "<attribute name='uomid'/>" +
    "<attribute name='productid'/>" +
    "<attribute name='amount'/>" +
    "<order descending='false' attribute='productnumber'/>" +
    "</entity></fetch>";

    var layoutXml = "<grid name='resultset' " +
    "object='1' " +
    "jump='roleid' " +
    "select='1' " +
    "icon='1' " +
    "preview='1'>" +
    "<row name='result' " + //Which filed you want to see in the View
    "id='productid'>" +
    "<cell name='name' " +
    "width='200' />" +
    "<cell name='productnumber' " +
    "width='150' />" +
    "</row>" +
    "</grid>";

    Xrm.Page.getControl("LookupFieldID").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true); // You need to replace lookup field Id

    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans