Reset Delegate Due Date

17 06 2010

Dynamics AX 2009 workflow has functionality built in by default to delegate work-items to new users. But what happens if your workitem is about to escalate when you delegate? The new assignee may only have a very short time to action the item. So if you want to reset the due date time of work-items on delegation, here is a quick and dirty way to get it right. Be warned, this is modifying a framework class so you will need to be careful when upgrading.

Class SysWorkflowEventDispatcher::onWorkitemDelegate

//Declare Variable (line 23)
WorkflowDateTimeTemp _dueDate;
//Generate and set new due date (approx line 114) after Setting description, before notifying assignee
_dueDate = SysWorkflowProviderService::resolveDueDate(_workItemContext.parmWorkflowCorrelation().parmWorkflowContext(), stepTable.StepId, workItemTable.UserId);
workItemTable.DueDateTime = DateTimeUtil::newDateTime(_dueDate.parmWorkflowDate(), _dueDate.parmWorkflowTime());

//notify the assignee
notification = EventNotificationWorkflow......

Happy Daxing




Leave a Reply

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

You are commenting using your 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: