SelectSql
Specifies the SQL statement to select items in the list.
This property is only applicable when the List block is not based on an existing grid or list; for example, when the List block is returned by the GetBlock(BlockName) method.
Value
String. Specifies the SQL SELECT statement.
Use the following syntax:
SELECT * FROM <TableName>
SELECT * FROM <ViewName>
Do not put anything after the table or view name. The WHERE statement is configured by the list.
Examples
NewList = CRM.GetBlock("list");
NewList.SelectSql = "Select * from vCompany";
NewList.AddGridCol("Comp_Name");
CRM.AddContent(NewList.Execute());
Response.Write(CRM.GetPage());
Displays a list of companies from the vCompany view.