Community
Showing results for 
Search instead for 
Do you mean 
Reply

Detecting name of layout when user connects

New Member
Posts: 3
Country: USA

Detecting name of layout when user connects

Hi everyone,

 

I recently wrote a quick add-in for my company to pull sales data from another source and display it in a customized tab.

 

I want to be able to detect a layout where based on the changing layout different data will appear within the customized tab when a contact changes.

 

Can someone show me a bit of sample code on how to retrieve the layout fileinfo name when a contact changes.

 

Thanks,

 

-- Jim

Employee
Posts: 1,163
Country: USA

Re: Detecting name of layout when user connects

The method stub generated after you hook into the layout loaded event gives you a layoutFileInfo parameter from which you can get the layout name

 

 void ApplicationState_LayoutLoaded(Act.UI.LayoutDesigner.LayoutFileInfo layoutFileInfo)
        {
            string s = layoutFileInfo.fileName.ToString();
            if (s == "")
            {
                doStuff();
            }
        }
Matthew Wood
Act! SDK Support
Community Moderator