Question

Currently I'm creating a Help Desk site on Sharepoint Online. I want each user to see their own created items only, so that I have checked the List Advanced Setting that only allow user who has created item to read and modify it.This works perfectly as expected.

However, I have another issue. In my list form, there is a CC field which is intended to allow person/group in that field to view the item as well.

I have tried to set up a workflow that will grant permission to those users to that item. The workflow has given those users Full Control over the item. But they still cannot view it!!!

I believe it is because they don't have the correct permission in the list and try to change this. But it appears that they will see all items in the list not just the one they are allowed to.

My question is that: Is there anyway that I can add another person to view an item that were created by another user?

Thank you for your help!

Was it helpful?

Solution

There is a couple of ways around this, however depending on how you would like to proceed may require an additional view for "CC" requests.

Mimic your first view but in the filter section filter your CC field to [Me].

OR

Using the SharePoint REST API, make a GET request to your list using your preferred method. (i'd use an jQuery Ajax call to the list, specify the header to accept JSON)

Also create another GET request to the "ContextInfo" which will return the current user's profile (display name, email address, ID etc)

Create another funtion to "Filter" the data. Your looking to filter where:

  1. CurrentUser === CreatedBy
  2. CurrentUser === CC

On document ready call both your ajax GET requests, (Context info first). On success of your GET request to get your list items run the Filter data function mentioned above. Store your filter in a variable then append it to a html table?

This will give your users a list of list items which they created OR are "CC'd" into. I've included some useful links below :)

SharePoint REST API Documentation

jQuery filter documentation

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top