TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rahul Khanna
NA
236
0
Remove permission for old task owner in approval workflow
Nov 30 2014 5:19 AM
I am programmatically delegating task to another user for a Nintex approval workflow. For example actual approver is "DOMAIN\Test1". And the delegated user is "DOMAIN\Test2"; Using the below code its delegating the task to "DOMAIN\Test2" user but the problem is still the actual approver "DOMAIN\Test1" retain the permission to complete the task, I mean "DOMAIN\Test1" still is able to click the "Complete Task" button, actually this button should be hidden for him("DOMAIN\Test1"). How can I do this?
using (SPSite currentSite = new SPSite("http://tst:001/sites/Test"))
{
using (SPWeb currentWeb = currentSite.OpenWeb())
{
string tasksList = "Workflow Tasks";
SPUser delegateTouser = currentWeb.EnsureUser("DOMAIN\\Test2");
SPListItem listItem = currentWeb.Lists.TryGetList(tasksList).GetItemById(101);
listItem[SPBuiltInFieldId.AssignedTo] = delegateTouser;
listItem[SPBuiltInFieldId.WorkflowVersion] = "1";
listItem.Update();
}
}
Reply
Answers (
0
)
Tree grid bind example.
how to create a live chat box in sharepoint using c#(as FB)