0

I'm looking for some suggestions in an implementation.

I currently have one script which reads the id number from the last item in a list.

It increments this number and sets it in the new item.

My problem is that with some users with lower levels of permissions, the script is unable to fetch the number.

Can anyone suggest a way to work around this?

6
  • If you need to work, what is the problem with requesting permission from the site collection administrator? Commented Sep 19, 2017 at 13:03
  • Sorry perhaps, I did not explain myself well. I'm site collection administrator. I just want to figure out a way for the script to work with all users, with all levels of permissions. Commented Sep 19, 2017 at 13:07
  • 1
    Give read permission to all of the users on that list. Commented Sep 19, 2017 at 13:20
  • Why are you fetching ID number? When you save an item it automatically gets an incremented ID number. Also, in client object model, the call back function or variable provides you with the ID of saved item. So what is use of fetching it first? Commented Sep 19, 2017 at 13:54
  • 1
    FYI With multiple users accessing this code you may run into concurrency problems where your 'last ID' is going to be a previous one Commented Sep 25, 2017 at 15:46

1 Answer 1

0

To answer my own question, the issue was not with the code itself, but with the location where the script was.

I moved the script to another folder and gave Read permissions to all users on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.