Execute(Arg)

Displays a list.

Parameters

Arg. This parameter accepts values of the following types:

  • String. This type of value is processed as the WHERE clause of an SQL statement.
  • Entrygroup. This type of value is used to form the WHERE clause of an SQL satement.
Examples

ListBlock = CRM.GetBlock("companygrid");
CRM.AddContent(ListBlock.Execute("comp_type='Customer'"));
Response.Write(CRM.GetPage());

Lists all companies whose type is Customer.

SearchContainer = CRM.GetBlock('Container');
SearchBlock = CRM.GetBlock('PersonSearchBox');
SearchContainer.AddBlock(SearchBlock);
if (CRM.Mode == 2)
{
resultsBlock = CRM.GetBlock('PersonGrid');
resultsBlock.ArgObj = SearchBlock;
SearchContainer.AddBlock(resultsBlock);
}
CRM.AddContent(SearchContainer.Execute());
Response.Write(CRM.GetPage());

Uses the result of the entrygroup search as the argument for the list.