Need to change edit/view permissions on the submitted infopath form

  • 19 September 2008
  • 7 replies
  • 2 views

Badge +3

I now have a requirement to control the view/edit rights on the submitted infopath form.


My workflow is to be implemented in such way that when a person submits a infopath document document to a form library, the form should only be editable by the assigned approver. The submitted form should be readonly for all others. Kindly advice me on methods for implementing this.


Thanks in advance for your help.


7 replies

Badge +10
Do you mean that only the form should be editable by the assigned approver through the normal process, or also if someone happens upon the from that is stored in a sharepoint library somewhere that they should not be able to do anything with it?
Badge +3

icon-quote.gifchrisg:
Do you mean that only the form should be editable by the assigned approver through the normal process, or also if someone happens upon the from that is stored in a sharepoint library somewhere that they should not be able to do anything with it?


Yes. That is exactly what I am looking for.

Badge +4

Hi,


I accomplished that by using a Sharepoint EventsProcess and a SharePoint List Items Event. When a new form is added an event is fired and I assign rights through SharePoint UserManagement.


Regards,


DD

Badge +9
If I am understanding you correctly, I have handled this situation in the InfoPath form rules.  Basically, I determine if the current user has any actions available and format the controls appropriately.  This can be done by querying the get workflow task actions service and checking if the first item's name is anything other than 'no actions are available for this task.'
Badge +10
icon-quote.gifDummyDumb:

Hi,


I accomplished that by using a Sharepoint EventsProcess and a SharePoint List Items Event. When a new form is added an event is fired and I assign rights through SharePoint UserManagement.


Regards,


DD



This is how i would do it, setting permissions via the permissions wizard. 

Badge +3

Thanks for your suggestion.

But,  I am new to K2.net and I have no idea how to implement your idea. It will be nice if someone could give me a few step by step instructions to implement it.

Badge +4

Hello,


When you are going to use VisualStudio, open a new K2 project in it.


From the toolbox you have to implement a SharePoint EventsProcess where you specify general settings like MOSS Server, the destination library and so on (if you're going to deploy your solution afterwards and you're not developing on your life system, it's good to use environment variables here). Through a SharePoint List Items Event that you need to add to your Process (also from the toolbox), you can retrieve information about the added form. The only tricky thing here is that the ItemID that you retrieve here is the NAME of the form and not the MOSS internal ID of the document. I had to use some code here and get the real ID through GetListItemFromListNameListItemName. With the real ID at your disposal you can add another event to your process from the toolbox (called Sharepoint User Management) through which you can finally assign or remove permissions.


Regards,


DD

Reply