.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Workflow - Change List Permissions - Time Issues

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#

I have a workflow which starts automatically on a submitted Expense Report InfoPath form. The default permissions on the Expense Report library is 'Contribute' for all users. The workflow then removes those permissions from the submitted Expense Report, and gives the Creator, Users Manager, and an Accounts Payable User 'Full Control' over the item.

My problem is that it takes approximately 5-10 seconds from the point the form is submitted, the workflow is started, and the permissions to change. I realize it's not a huge window of time, but it is enough time for anyone looking in that folder, to notice someone else's Expense Report and click on it.

I tried creating an 'Incoming Expense Reports' library, with a workflow on it that would change the permissions, and then copy the item to the Expense Report library, but the permissions were not copied over to the new item.

Does anyone have any suggestion on how I can reduce the time it takes to change permissions to 1-2 seconds, or any alternative way of solving this?

View Complete Post

More Related Resource Links

how to change the permissions list items using the workflow?

How to change the permissions list items using the workflow? Or how to instull SPDActivities on sharepoint 2010?

Help with Workflow Task List Permissions

Here's the scenario:  I have a workflow that is assigned (in parallel) to a series of people.  I've limited each person's permissions within the Workflor Task list to strictly edit by creating a custom permissions level.  So now workflow participants are able to Approve the workflow task, but cannot delete the item.  However, now, I wish to limit the tasks a user can approve to only the items that are assigned to them.    I assumed that the (Workflow Task List > List Settings > Advanced Settings >  Item Level Permissions > Edit access: Specify which items users can edit) set to 'Only their own' would do the trick, but that setting doesn't seem to impose any limitation on which task item a user can edit.    Oddly enough, when I set the (Read access:  Specify which items users can read) to 'Only their own' I loose access to every single item in the task list; even the ones that are assigned to me.  What gives?  I thought maybe SharePoint's interpretation of 'their own' possession was linked to who created the item instead of who it's assigned to, but these 2 behaviors don't seem to support that theory at all.    Is this a bug in SharePoint because I'm stumped.   Thanks! -Tracy

How do I change Associated task list in a workflow

Hi, I use Sharepoint Designer 2010. How do I change Associated task list in a workflow that I just made. I didn't see any settings where I could adjust the associated task list! Please help.   Regards, Luka

Anyway to change permissions on a record in a list?

I think I know the answer to this, but need to ask.  Is there anyway, without doing custom development, to change the permissions on a record such that it no longer permits changes? In other words, change status field to "Done" and from then on no more changes.  We can only do WSS "out of the box" and SharePoint Designer.  No development or XML allowed.--rms www.rmschneider.com

How to change item user permissions by workflow using item fields


Hi, thats not a question, but solution. I have read a lot of requests about how to perform this task, so here it is.

Code behind will run workflow which will take XXZ and XXY which are user fields and assign their values as "Full acces" and "Design" user permissions to given list item.

This workflow contains two sections. onWorkflowActivated1_Invoked and SetItemPermissionsEx.

using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.WorkflowActions;

namespace ITCSharepointAddons.Comm_UpdateItemPermissions
  public sealed partial class Comm_UpdateItemPermissions : SequentialWorkflowActivity
    public Guid webID; 
    public Guid siteID; 
    public Guid listID; 
    public int itemID; 
    public Guid workflowId = default(System.Guid); 
    public SPWorkflowActivationProperties workflowProperties = new SPWorkflowActivationProperties(); 


Workflow or Time Job for email reminder on Tasks List in Share Point 2007


I need to send a reminder to the person whom a task has been assigned 3 days before a due date. We also wants to re-use this workflow/time job on other lists as well. Name of the lists can be different??


Also if the due date gets change it should change the reminder accordingly.

Which approach i should take to achieve this?? 




Change the Setting After Approval Workflow done in Sharepoint List Item


Hi Team,

Me and My Team are new for Sharepoint and we want to resolved one task.
Scenario: We have approval workflow on Document List. Now, Our Client wants that once that Document is uploaded, workflow gets started for approval process. which we have done.
Now, They wants that once Document get approved, No one can change the document. It means document will be stop for editing, they can open that and review / print / do other action except Editing and Deleting.

Now, does anyone know how can we achieve the same using custom coding in Visual Studio or Sharepoint Designer ?
i guess we should remove the rights from that document permission for this else we have no idea.

But in either case, Please guide us How to do that step by step.
Thanks for your kind Support.

Thanks & Regards, Brijesh Shah

SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



Setting permissions of a specific SharePoint workflow


We have a very simple workflow whereby an document placed in a public library (INBOX) is moved it to a private library (VERIFY) and then deleted. The workflow works correctly when someone who has access to the VERIFY library drops a record into the INBOX library.  However it does not work when the user does not have access to the VERIFY library.

I was told that I need to "set the AD group associated with a specific SharePoint workflow" but cannot find any reference to this in SPD.



Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Trying to send email using Sharepoint Designer 2007 workflow and email enabled list


I have a a list that recieves email. I have few fields that shows me the originator: "E-Mail From" and "E-Mail Sender".

I am trying to create a workflow that will generate an auto reply to the originator but the SPD fails to recognize the email address in these two fields. It's either truncating part of it or uses the html ( href=mailto:Demo@DemoSomething.com) in the To field.

Thank you,


Workflow field not being added to list or views when adding a workflow


This problem just started happening in my entire site collection.  Anytime I associate a workflow to any list or doc lib the Workflow column that shows the status and links to the history is not beind added to the list or any views and is nowhere to be found.   Here's exactly what I'm doing:

1.  Go the List settings -> workflow settings -> add a workflow (for this example the OOB approval workflow)

2.  After adding I go to the List, the workflow column doesn't exist.

3.  I go to "modify view", and the workflow column is not listed in the available columns.

Any help is greatly appreciated.

Workflow timing issues?


I am creating a new workflow using SPD on MOSS 2007, SP2, and having a problem with it.

The workflow is fairly basic, where when a user creates a new infopath form it sends an email to another person, who enters some info, then selects where it get's routed to next.  There are 3 more similar processes before the form is marked as completed.  At each step the WF emails the person selected as next reciepient and updates a "flag" saying which step the process is in.

The problem is that sometimes when I update a form, (all emails come to me since it's still in testing), the workflow stops with a message of "Failed on Start (retrying)".  After doing some digging I found this link:


So I went in and added an action for every update I do to first check the document out, do the update, and then check the document back in.  Well the problem I get now is that the WF fails with a message about unable to check the document back in.  I tried troubleshooting it by putting in WF Stop and Log entry actions to try to figure out exactly where the problem was happening.

I thought I had fixed it

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



SPField of WorkflowEventType in the Workflow History List has value Workflow Initiated but when i ed


hi all

how are you

i wish anyone could help me in this problem

i have a sharepoint sequential workflow created in visual studio

when the workflow starts i log into the workflow history list that workfow is started using the LogToHistoryListActivity

i entered the hidden workflow history list from the browser for example:


i noticed that an item is created in the above list when i run my workflow

the field Event Type in the item above has the value of Workflow Initiated but when i edit the item i noticed that the field Event Type has a value of 0

so can anyone tells me how this field works and from where it is getting itsvalues

thanks a lot


Change the Workflow Status through code


HI Folks,

I have a scenario where i need to develop a 6 stage approval workflow(sequential) using WWF and depoly it to sharepoint. Everythigns fine till here.

Now we look ahead to change the Status field on the documents library which actually has the Workflow Name as the column name and its value being In Progress, depending on the stage of approval. Like(Approved 1, Approved 2, Approved 3.)

And if rejected the status should be rejected than Completed. Any idea how can we update this column of the List item.

I have tried item[workflowProperties.Workflow.ParentAssociation.Name]="Approved 1";

But this throws an error saying input string is not in a correct format.

Any information would be of great help :)


Sreeharsha Alagani

Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend