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 :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Setting Custom View as defa...

Setting Custom View as default for lookup in Connection entity. (CRM 2011)

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

To create a custom view for a lookup, we can refer to this blog post

https://nishantrana.wordpress.com/2010/12/31/filtered-lookup-in-crm-2011/

Here

lookupControl.addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);

Setting last parameter as “true” sets the custom view as default. However this was not happening in case of connection entity lookups.

So to finally achieve this we did the following

Modify the lookupinfo.aspx “..\Microsoft Dynamics CRM\CRMWeb\_controls\lookup”.

Find the function named handleView and modify it to show our custom view as default.

function handleView(o, entity){
var selObjectsDropdown = (typeof (selObjectsList) == Mscrm.TypeNames.undefinedType) ? selObjects : selObjectsList;


if (o.innerHTML.indexOf(‘Case Member View’)!=-1){

var sOriginalViewId = “{C0F1DD64-1BF3-450D-BCDE-DF4732DE1001}”;

}
else {

var sOriginalViewId = crmGrid.GetParameter(“viewid”);
if (selObjectsDropdown.selectedIndex != -1 && selObjectsDropdown.options.length > 0) {
var tempDefaultViewId = selObjectsDropdown.options[selObjectsDropdown.selectedIndex].guid;
if (!IsNull(tempDefaultViewId)) {

sOriginalViewId = tempDefaultViewId;}}}

. . . . . . . .

. . .

It is an unsupported customization!!!!

Bye..


Filed under: CRM, CRM 2011, Microsoft Dynamics CRM Tagged: CRM 2011

This was originally posted here.

Comments

*This post is locked for comments