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.
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 issue.
Have anyone had the solution for this problem yet?
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.
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.
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
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.
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
}
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
Victor Onyebuchi
6