Below is some example code that shows how to create a compound page that displays an EntryGroup and List using the Web Class.
using Sage.CRM.Controls; using Sage.CRM.Data; using Sage.CRM.UI; using Sage.CRM.Utils; using Sage.CRM.WebObject; namespace SA_Basic_1 { class ViewCompanyANDOppos : Web { public override void BuildContents() { GetTabs(); AddContent(HTML.Form()); VerticalPanel myContainer = new VerticalPanel(); EntryGroup myCompanyBoxShort = new EntryGroup("CompanyBoxShort"); Record myCompany = FindCurrentRecord("company"); myCompanyBoxShort.GetHtmlInViewMode(myCompany); List listCompanyOppos = new List("opportunitylist"); listCompanyOppos.Title = Metadata.GetTranslation("tabnames", "opportunity"); listCompanyOppos.Filter = "oppo_primarycompanyid = " + GetContextInfo("company", "comp_companyid"); myContainer.Add(myCompanyBoxShort); myContainer.Add(listCompanyOppos); AddContent(myContainer); } } }
Notes:
The Notification is displayed because of the standard behaviour of the GetTabs() method.
The page is arranged using a VerticalPanel class.