Custom Table Form visibility

Daniel Reed asked on June 23, 2015 10:07

Hi all,

I have a custom table called 'links'. This table stores everyone's quick links. I only want people to be able to view and edit their own records.

I have almost everything working, but I don't know how to prevent users from typing in a url to get to someone else's edit form. I want to either say 'permissions denied' or hide the form. At the moment I am trying to set the web part's visibility based on a macro, but I can't figure out how to say 'current record's ItemCreatedBy field'

Can someone please point me in the right direction?

Recent Answers


Brenden Kehren answered on June 23, 2015 13:45 (last edited on December 10, 2019 02:30)

In your WHERE clause, just add ItemCreatedBy = {% CurrentUser.UserID |(identity)GlobalAdministrator%} So not only will you have your querystring, you also have the current user that they cannot modify.

0 votesVote for this answer Mark as a Correct answer

Daniel Reed answered on June 24, 2015 04:02

That's what I would do too, but a custom table form web part doesn't have a where clause (that I can find)

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 24, 2015 13:21

Clone the webpart then and add that property.

0 votesVote for this answer Mark as a Correct answer

Daniel Reed answered on June 24, 2015 15:57

Thanks Brenden. I'll either do that or write a custom web part from scratch.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.