Hi Experts ,
I have one custom entity which I am using for my custom web resource button show ,hide purpose. I have included security role lookup in this entity. But when I am selecting the security role from lookup it does not populate the business unit name , I cant see the Business Unit name when I am clicking on more records as wll. Is there any way to change this security role view for security role lookup.
*This post is locked for comments
did you change the lookup view of security role entity? Please check what views is being used in your lookup property from the form editor.
by default security role - lookup view has only name. you can change it from the customization.
Hi All,
I have found the solution for this. I am using Fetchxml to change the view -
function SetSecurityRoleLookUpView() { //61F8D435-8E25-4751-8330-5969506EF536 --For Lookup view //07625F32-B4E6-4E02-ABFB-592DCFDAC270 --Roles Advanced Find View var viewId = "{07625F32-B4E6-4E02-ABFB-592DCFDAC270}"; var entityName = "role"; var viewDisplayName = "Roles Advanced Find View"; var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" + "<entity name='role'>" + "<attribute name='name'/>" + "<attribute name='roleid'/>" + "<attribute name='businessunitid'/>" + "<order descending='false' attribute='name'/>" + "</entity></fetch>"; var layoutXml = "<grid name='resultset' " + "object='1' " + "jump='roleid' " + "select='1' " + "icon='1' " + "preview='1'>" + "<row name='result' " + "id='roleid'>" + "<cell name='name' " + "width='200' />" + "<cell name='businessunitid' " + "width='150' />" + "</row>" + "</grid>"; Xrm.Page.getControl("LookupFieldName").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true); }
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156