A new component has been added to the Example Components & Developer Resources (All Versions) download section. The new component is a rebuild of the PeopleList system action that provides the returned data for the Person tab under the company context.
The C# code used to create the page is shown below.
using Sage.CRM.WebObject;
namespace SagePeopleList
{
public class PeopleList : ListPage
{
/* Constructor needs EntityName, ListName, IdField, FilterByField, FilterContext and ScreenName
*/
public PeopleList()
: base("Person", "PersonList", "PersonFilterBox")
{
FilterByField = "pers_companyid";
FilterByContextId = (int)Sage.KeyList.CompanyId;
}
public override void AddNewButton()
{
AddUrlButton("NewPerson", "new.png", Url("1202"));
}
public override void BuildContents()
{
base.BuildContents();
string strHelpFile = "//Main%20Menu/Content/User/AI_AddingNewPersonToExis.htm?cshid=User%2FAI_AddingNewPersonToExis.htm";
AddHelpButton(strHelpFile);
}
}
}
The important things to note are
- The use of the new PersonFilterBox in the constructor and the link to the company context.
- The recreation of the New Person button to ensure the New button behaves correctly.
- The recreation of the Help button to point to the correct online user help file.