Workflow for Secondary Entity

By | July 18, 2011

Workflow in Sage CRM can be easily configured for Primary Entity but the out of the box system is not configured to handle workflows for Secondary entity. Jeff, as usual, came up with this fantastic workaround in his blog post

http://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2007/12/23/adding-workflow-capability-to-a-secondary-or-custom-entity.aspx

Using the above link we were able to enable the workflow for the Secondary entity but were not able to view the workflow action button on summary page. Normally the workflow button is enabled when we insert the following code.
Container.ShowWorkflowButtons = true;
Container.WorkflowTable = ““;

After some analysis we realized that if we need to enable a workflow for a secondary entity then the approach is slightly different. Normally here is what we do if we have to view information for a secondary entity.
var Summary=eWare.GetBlock(“< screen >”);
Summary.Title=”XXXX Details”
Summary. ArgObj=
Container.AddBlock(Summary);
eWare.AddContent(Container.Execute());

But if we have to enable a workflow custom secondary entity then we need to use the below code.
var Summary=eWare.GetBlock(“< screen >”);
Summary.Title=”XXXX Details”
Container.AddBlock(Summary);
eWare.AddContent(Container.Execute(“< record >”));

Hope this helps.

[We would like to Thank our Partners, Followers and Friends for making this possible. Greytrix named as (First) Sage Gold Development Partner of the Year 2011 – SageCRM. Winners were presented at the recently held Sage Software’s Largest Partner and Customer Conference, Sage Summit 2011 at the Gaylord National Hotel and Convention Center in Washington D.C.]

If you find this content useful, please drop us an email at crm@greytrix.com.