question

Michalww-3014 avatar image
0 Votes"
Michalww-3014 asked AmosWu-MSFT commented

Change default ID Field in form URL to different field

Hi

I'm struggling with finding a solution to the following exercise:

I'm having a SP list with workflows that send URL link to the edit forms. Currently, the users receive standard URL which is http://myorgsite.net/sp/lists/list_name/form_1.aspx?ID=123, where 123 is the value of ID field. Basically, users can access the form of any other item from the list by changing the value at the end of the URL.

I thought of two approaches to this challange

encrypt/hash the URL link so the users will not get possibility to edit anything; or
change the part of the URL link so the other field would be used. e.g http://myorgsite.net/sp/lists/list_name/form_1.aspx?REF=2h34y324n where "2h34y324n" is the value of calculated field
I would appreciate an assistance in resolving this challange

office-sharepoint-server-development
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Michalww-3014 ,
I am checking to see how things are going there on this issue. Please let us know if you would like further assistance.
You can accept the helpful post as answer to help other community members find the helpful information quickly.
You can also share your own solution here and mark it as answer, and we can learn from each other.

0 Votes 0 ·
Michalww-3014 avatar image
0 Votes"
Michalww-3014 answered AmosWu-MSFT commented

is there any way to fully mask the URL then?

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

  1. You could create a page and add js code to the page ,the js code should get the encrypted edit form url in the url, decodes and forwards to the corresponding page.

  2. You could try to encrypt the whole url of the edit form and combine the url of the above page with the encrypted edit form url and send it to the user.

When the user visits this url, page will be automatically forwarded to edit form.
The disadvantage is that the user can see the decrypted eidt form url through the developer tool, and then he can still edit other items by modifying the ID value.








0 Votes 0 ·

Do you have any other ideas how I could handle this potential issue with changing ID value?

Is it possible to apply form level permission to the item?

0 Votes 0 ·

We can only restrict user edit items through item level permissions.

0 Votes 0 ·
Show more comments
AmosWu-MSFT avatar image
0 Votes"
AmosWu-MSFT answered AmosWu-MSFT edited

As I know,it's impossible to achieve this.ID Number id is the unique identifier of item,and it is auto-incremented for you automatically.Without the ID, it is impossible to determine which item is being edited in the editform.
If you do not want the user to edit other item,you could try to use permission.


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.