web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    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

    }

  • Community Member Profile Picture
    on at

    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

    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

    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.

  • Community Member Profile Picture
    on at

    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.

  • Anh Luu Profile Picture
    215 on at

    I have the same issue.

    Have anyone had the solution for this problem yet?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans