Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011: Getting View GUID from View Name

$
0
0

Hi everyone,

I want to make a dynamic script in CRM 2011 that will allow users to pass in the name of a view and the name of a lookup. It will then display the view for that lookup.

The issue is the method used to set the view takes in a GUID and not the Name.

How can I get the GUID from the View Name?

I DO NOT want users to have to manually lookup the GUID and pass that as the parameter.

Here is an example of what I'm looking for in code:

function setView(viewName, lookupName)
{
    //  Get GUID from view name.

    viewGUID = ??????

    //  Set the view.

    Xrm.Page.getControl(lookupName).setDefaultView(viewGUID);

}



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>