Hello everybody,
I am working to do OutOfOffice using K2 API
My Code is the following
WorklistCriteria criteria = new WorklistCriteria();
Destinations destination = new Destinations();
destination.Add(new Destination(("K2:"+AssignedTo), DestinationType.User)); //e.g. K2:DOMAINUsername
WorkType worktype = new WorkType(AssignedTo, criteria, destination);
WorklistShare worklistshare = new WorklistShare();
worklistshare.ShareType = ShareType.OOF;
worklistshare.WorkTypes.Add(worktype);
//Share the worklist
ktwoWorkflowClientServer.ShareWorkList(worklistshare);
//Share the worklist for a managed user
//ktwoWorkflowClientServer.ShareWorkList(originator, worklistshare);
//When the current user's status is set to OOF the worklist shares defined above will take effect
ktwoWorkflowClientServer.SetUserStatus(UserStatuses.OOF);
return true;
I think this code works fine. The delefate user can see the task of the user that is out of office, but when he want to execute an action from SmartForm it appears the following error
24411 K2:** from ** is not allowed to open the worklist item with SN=2063_30
Anyone knows what happen?
Thanks