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-09-2012 10:27 AM
Looks like it's exposed: Act.UI.LayoutDesigner.LayoutPicker, but isn't intended for consumption via the SDK.
Sorry.
08-10-2012 01:01 AM
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
application.UILayoutDesignerManager.SetCurrentLayout(lfi);
here lfi is the LayoutFileInfo for the needed layout.