Below is some example code that shows how to create a simple list using the Web class.
using Sage.CRM.Controls; using Sage.CRM.Utils; using Sage.CRM.WebObject; namespace SA_Basic_1 { class CompanyOppos : Web { public override void BuildContents() { GetTabs(); AddContent(HTML.Form()); List listCompanyOppos = new List("opportunitylist"); listCompanyOppos.Title = Metadata.GetTranslation("tabnames", "opportunity"); listCompanyOppos.Filter = "oppo_primarycompanyid = " + GetContextInfo("company","comp_companyid"); AddContent(listCompanyOppos); AddUrlButton("new", "newopportunity.gif", Url("1190")); AddHelpButton("help.htm"); } } }
Notes:
- The Notification is displayed because of the standard behaviour of the GetTabs() method.
- The Coaching Caption has been added using the translation customization feature.