Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Limit permissions to see only its own entries

Posted on by 370

Hello,

I need to set up "permission set" so that each user (employee/purchaser) can (read/write) only its own Purchase Invoice records and not from other collogues. Based on "Purchaser code" and/or "assigne to" fields on Purchase documents (purchase invoice, posted purchase invoice, purchase order and purchase quote)

In permission, when doing filtering per entry, how can I set to be @=current user (or what is the syntax?) 

I have lot of users, and trying to avoid having for each user its own permission set due to filtering per hardcoded value.

Thank you,

Kind regards

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,760 Super User 2024 Season 2 on at
    RE: Limit permissions to see only its own entries

    Hi, hope the following helps as well.

    https://yzhums.com/8417/

    https://yzhums.com/8427/

    Thanks.

    ZHU

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: Limit permissions to see only its own entries

    Yes, as per your needs.

  • Hrvoje Kusulja Profile Picture
    Hrvoje Kusulja 370 on at
    RE: Limit permissions to see only its own entries

    ah, ok, so without AL code and custom extension it is not possible to enter some syntax in filter column?

  • Suggested answer
    Binesh Profile Picture
    Binesh 7,885 on at
    RE: Limit permissions to see only its own entries

    You can customize the page extension if the Security filter not works for you.

    See the below reference,

    trigger OnOpenPage()
        begin
            FilterGroup(2);
            SetRange("Assigned User Id", UserId);
            FilterGroup(0);
        End

  • Hrvoje Kusulja Profile Picture
    Hrvoje Kusulja 370 on at
    RE: Limit permissions to see only its own entries

    Please advise how can I use Field Filter for current user using USERID ? Thank you

  • Hrvoje Kusulja Profile Picture
    Hrvoje Kusulja 370 on at
    RE: Limit permissions to see only its own entries

    Tx, but i do not plan to create for each user its own permission set. Pleas advise how can I use Field Filter for current user? Thank you

  • KTA Profile Picture
    KTA 1,200 on at
    RE: Limit permissions to see only its own entries

    You can use security filter base on purchaser code on permissions. If you want to do it by code, you would have to use function USERID.

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: Limit permissions to see only its own entries

    Hi Hrvoje Kusulja 

    1. You need to create copy of permission sets which is given to those employee/Purchaser.

    2. Then add this security filter in respective table

    pastedimage1658139230810v1.png

    pastedimage1658139036151v2.png

    3.Above is the example where I have given the Purchaser Code must be vaishnavi only that time it would give Read, Write, Modify permission otherwise no. And then assign this permission set to that user.

    4. Please note if your employee or Purchase has super permission or any other permission sets which has full access on these table then you must remove that since it will override your new permission sets.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,537 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans