Code example: WorkflowTable and ShowNewWorkflowButtons properties

The following ASP code demonstrates how to use the WorkflowTable and ShowWorkflowButtons properties. This code displays a list of records and buttons for any Primary rules on the workflow for MyTable if the primary rules are configured to use a custom file.

<!-- #include file ="sagecrm.js" -->
<%
Response.Write(CRM.GetTabs());
MyList=CRM.GetBlock("MyTableList");

// To show the button on the right, put the list into a container and add the button to the container.
Holder = CRM.GetBlock("container");

// Add the list to the container.
Holder.AddBlock(MyList);

// Hide the default Edit/Save button on the container.
Holder.DisplayButton(Button_Default) = false;

// Configure the list to show all records.
MyList.ArgObj = '';

// Show the new workflow buttons for the Primary rules.
Holder.WorkflowTable = 'MyTable';
Holder.ShowNewWorkflowButtons = true;

// Display the container.
CRM.AddContent(Holder.Execute(''));
Response.Write(CRM.GetPage());
%>