08-09-2012 07:23 AM
quick question - is it possible to change the layout file used programmatically?
I know the file name can be retrieved but i've failed at finding anything in the code reference that would allow me to change it, am I missing it?
08-13-2012 01:50 AM
Figured it out. Just in case anyone is interested, it can be done using UILayoutDesignerManager.
this gets all the available opportunity layouts (replace .opportunity with whatever type of layout you need.
LayoutFileInfo layoutarray = application.UILayoutDesignerManager.GetAvailableLayouts(LayoutType.opportunity);
when you have the LayoutFileInfo for the layout you want displayed, you can set it with
here lfi is the LayoutFileInfo for the needed layout.