Assign Workflow through X++ Code

Hi,

I need to know whether there is any possibility that workflow can be assigned to a user through x++ code. The scenario is that if an item is received against any purchase requisition then the requesting user must approve it before it can be packing slip updated.

Will appreciate if any one of you could help me in this regards.

Rgds

Haroon

hi,

you can edit MyCustomWFParticipantProviderClass.resolve method like this:

public WorkflowUserList resolve(WorkflowContext _context,

WorkflowParticipantToken _participantTokenName)

{

WorkflowUserList userList =

WorkflowUserList::construct();

;

userList.add(‘Admin’);

return userList ;

}