Skip to main content

Hi,


One part of my process is to create a list item and to manage the permission for this item so that only the destination user has full control. A second user should have read access.

I know how to get the list item id for the item i have created. But setting the user permission does not work.
What`s the best way to do this?


It is really urgent :-(
Thanks,
Jochen

What part is not working?  Are you using the User Managerment Event?

when I am trying to set the user permission all the other user are delete from the item permission (thats good) but only the k2 Service account gets permission on the item and not the user which I have configured in the management event.
Should I use "manage user permissions" or should I add a user to a list item?
Thx, Jochen


is this a bug? I use "Manage Persmission SharePoint List Item" and the ID for the item is also correct.

Does anyone have experiences with the SharePoint user management event.

I am working on the denallix 2.2...so i think there is everything configured correctly.
Thx, Jochen


Hello Jochen,


I'm using Manage Permission in an Infopath Library which works fine.


It's a 2-step process - first you add the user/group to the document/list item and afterwards you assign rights to the user - so in the process view you should actually see 2 events within one activity.


Regards,


DD


I think I am doing the same...but the user is not added


Hello Jochen,


Did you cross-check if the returned item-ID is the 'real' MOSS ID of the item. Don't know how this is handled in a sharepoint list, but in a forms library K2 returns the name of the item which is not the MOSS-internal item ID. For this I had to retrieve the real ID through code.


Regards,


DD


Hi Jochen,


I had a similar problem with the User Management Event.


During the course of the workflow the worklist item would be sent to the user's manager, director, so on and so forth, and all those user's would need to have read access to the form library item at the end of the process.  If I added the user's on the UME using the InfoPath XML Fields from the K2 Object Browser and left the wizard, none of those user's were saved in the UME.  Keep in mind I wasn't hardcoding any users, I would drill into the IP XML and add something like domainworkfromhome_xmlfield_for_managerid The next time you open the UME event, it would have zero people in there.  Strange, indeed!


My workaround was to create a client code event, load the XML of the InfoPath form into an XmlDocument object, grab the user's ID (their AD id), assign that ID to a process level data field, and then in the UME event assign my permissions to those Process Level Data Fields.


It works fine, feels a little hacky, but support said it was a known bug and I haven't heard of a fix yet.


Hi,
Thank you for this. But in my situation I was alos hardcoding the user in the UME and nevertheless the user wasn't added. Is there something to consider in the UME. If I want to set permission for an InfoPath form the id is the name (which I used to save the form), right?


icon-quote.gifDummyDumb:

Hello Jochen,


Did you cross-check if the returned item-ID is the 'real' MOSS ID of the item. Don't know how this is handled in a sharepoint list, but in a forms library K2 returns the name of the item which is not the MOSS-internal item ID. For this I had to retrieve the real ID through code.


Regards,


DD



Hello Jochen,


If you want to assign permissions to an Infopath Form you must not use the ID of the Event Item that you get back (which is the name of the Infopath form). The ID of the form is a number whereas the ID you get back in the event is the name of the document. (I had to retrieve the real ID via code).


Have a look at this post to see if this solves your problem:


http://www.k2underground.com/forums/thread/26289.aspx


Regards,


DD


...strange...
so I have to write code before I can use the UME? Is that right?
If I want to set user permission for a list item (not a library) can I then use the ItemID? I don't think so because it is not working with the ID which I get through the SPEventFields.

Hello Jochen,


Concerning Infopath documents in a document library I didn't find any other possibility than use code to get the real ID. Concerning a normal list item in a list, I cannot contribute anything, as I haven't tried to bind a UME to a list item yet.


Reply