Home > Dynamics Ax > Hints on Workflow implementation for EP in Ax 2009

Hints on Workflow implementation for EP in Ax 2009

When we are developing the workflow for EP in Dynamics Ax 2009,

We won’t find the workflow related control on the Tool box list, as we are finding other controls like AxGridView etc.

For this explicitly we need to add the Markup tags to the control.

Select the AxUserControl, right click and select the View Markup

Add the following lines in the markup view (change the properties accordingly as your scenarios)

<%@ Register Assembly="Microsoft.Dynamics.Framework.Portal, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    Namespace="Microsoft.Dynamics.Framework.Portal.UI.WebControls.Workflow" TagPrefix="dynamics" %>


<dynamics:AxWorkflowActionBar ID="WorkflowActionBar" runat="server"


    DataSourceID="dsEPProjProposalInfo"     onworkflowworkitemactioncompleted="WorkflowActionBar_WorkflowWorkItemActionCompleted" />

<dynamics:AxDataSource ID="dsEPProjProposalInfo" runat="server" DataSetName="EPProjProposalInfo" />


Observe form the above markup tags AxWorkflowActionBar and AxDataSource are connected using AxDatasource ID. (Properties mentioned in green color)


To implement the methods related to workflow control in the code behind sheet (in Actual C# code sheet), add the following line.


using Microsoft.Dynamics.Framework.Portal.UI.WebControls.Workflow; 


For more details and how to implemnet the worklfow for EP pages, go through the following link. 


Computer…..     E-mail….    Boy


Categories: Dynamics Ax
  1. Unknown
    March 9, 2010 at 5:18 pm

    Hi Santosh,I have trying to get workflow on EP.I have added your above code also but still i cant see the yellow bar on EP.I have added the Web menu items in AX and made the necessary changes to the Submit workflow class as per the MSDN article.http://msdn.microsoft.com/en-us/library/ee677494.aspxStill no help.Any idea?Aman

  2. Santosh Kumar
    March 12, 2010 at 11:10 am

    Hi Aman,Almost i had also follwed the same. for me no issues.In your web part, have you placed the C# code related to workflow controls.u need to define some methods. for quick reference please see the following link.http://blogs.msdn.com/solutions/archive/2008/07/30/using-microsoft-dynamics-ax-2009-workflow-controls-in-ep.aspxstill if you have any issues, please feel free to contact me.Best Regards,Santosh Kumar Paruvella.

  3. Rajendra prasad
    October 13, 2010 at 9:35 am

    I am creating workflow on Enterprise portal for EPInventInfo and i have followed all the steps in u r blog,But in my code behind page i have to call proxy how to get proxy.the following code i have written.

    Designe page or makup code:

    code behind page:

    #region Using Directives
    using System;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Diagnostics.CodeAnalysis;
    using Microsoft.Dynamics.Framework.Portal.UI.WebControls;
    using Microsoft.Dynamics.Framework.Portal.UI.WebControls.WebParts;
    using Microsoft.Dynamics.Framework.Portal.UI;
    using Microsoft.Dynamics.Framework.Data.Ax;
    using Microsoft.Dynamics.Framework.Metadata.Ax;
    using Proxy = Microsoft.Dynamics.Framework.BusinessConnector.Proxy;
    using ApplicationProxy = Microsoft.Dynamics.Portal.Application.Proxy;
    using Microsoft.Dynamics.Framework.BusinessConnector.Session;
    using Microsoft.Dynamics.Framework.BusinessConnector.Adapter;
    using Microsoft.Dynamics.Framework.Portal.UI.WebControls.Workflow;

    void Page_Init(object sender, EventArgs e)
    this.WorkflowActionBar.EvaluatingCanSubmitToWorkflow += new EventHandler(WorkflowActionBar_EvaluatingCanSubmitToWorkflow);
    this.WorkflowActionBar.WorkflowConfigurationLoading += new EventHandler(WorkflowActionBar_WorkflowConfigurationLoading);
    this.WorkflowActionBar.WorkflowConfigurationActive += new EventHandler(WorkflowActionBar_WorkflowConfigurationActive);
    this.WorkflowActionBar.WorkflowWorkItemActive += new EventHandler(WorkflowActionBar_WorkflowWorkItemActive);

    void WorkflowActionBar_EvaluatingCanSubmitToWorkflow(object sender, EvaluatingCanSubmitToWorkflowEventArgs e)
    //Boolean canSubmit;
    //IAxaptaRecordAdapter record = e.DocumentRecord;
    //ApplicationProxy.InventTable inventTable = new ApplicationProxy.InventTable(this.AxSession.AxaptaAdapter, record);
    //canSubmit = (Boolean)inventTable.canSubmit();

    //e.CanSubmitToWorkflow = canSubmit;
    e.CanSubmitToWorkflow = true;
    void WorkflowActionBar_WorkflowConfigurationLoading(object sender, WorkflowConfigurationLoadingEventArgs e)
    ISession session = this.AxSession;
    //ApplicationProxy.InventTable inventTable = new ApplicationProxy.InventTable(this.AxSession.AxaptaAdapter, record);
    //Use a proxy class to retrieve your desired workflow configuration
    e.WorkflowConfiguration = YourProxy.loadWorkflowConfiguration(session.AxaptaAdapter);
    void WorkflowActionBar_WorkflowConfigurationActive(object sender, WorkflowConfigurationActiveEventArgs e)
    // Do something interesting with the configuration
    IAxaptaRecordAdapter workflowConfiguration = e.WorkflowConfiguration;
    void WorkflowActionBar_WorkflowWorkItemActive(object sender, WorkflowWorkItemActiveEventArgs e)
    // Do something interesting with the workflow work item.
    IAxaptaRecordAdapter workflowWorkItem = e.WorkflowWorkItem;

    Thanks & regards,
    Rajedra prasad

    • October 13, 2010 at 9:54 am

      Hi Rajendar,

      I will mail you in details, how to use Proxies….

      Best Regards,
      Santosh Kumar Paruvella

      • Manoj
        April 2, 2012 at 7:55 am

        Hey I am facing the same situation. Please provide me the details too.

      • April 3, 2012 at 5:33 am

        Hi Manoj,
        Please follow the steps, which are mentioned in this article.
        Best Regards,
        Santosh Paruvella

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: