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); }