How to create an assigned to filter on your workflow enabled form.

16 03 2010

Do you have the need to create either a customised form or add an additional filter to an existing form that only displays records that have been assigned to you or a specific user.

The basic concept is that you need to join your document’s table to the WorkflowWorkItemTable on the RefRecId and RefTableId.

You then need to add 3 filters (query ranges):
1) Filter where WorkflowWorkItemTable.Status = WorkflowWorkItemStatus::Pending
2) Filter where WorkflowWorkItemTable.UserId = [userid of the person you want to filter for e.g. curuserid()]
3) Filter on current companyid.

To check out a full selection of code in practice, checkout how they do it for Purchase Requisitions is Dynamics AX Classes -> PurchReqShowRequisitionsFilter -> filterAssignedToMe

Hope this useful to someone.

Advertisements

Actions

Information

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s




%d bloggers like this: