web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

how to restrict an action button to a specific user in NAV 2017

(0) ShareShare
ReportReport
Posted on by 4,188

Hi,

I'm having two users the requester and CEO,

I'm using send approval workflow to request the CEO, now CEO logs in and approves the request now the CEO clicks on sign off button which ticks the sign off field in the form.

I want to restrict this button only to be used by the CEO, other users shouldn't be able to use them. 

also the send approval button needs to be restricted only to a specific user

how can I do so.please provide me suggestions.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Amol Salvi Profile Picture
    18,698 on at

    With little customization you can do that

    Add one boolean field in User Setup as 'CEO' and on Sign off button check for that field .

    IF the user is NOT CEO then popup error message.

  • Verified answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    Do as per other member suggested, OR you can also hide that action if you would like,

    for that you have to do same thing and add one boolean variable like: IsVisible and assign this variable to action group of VISIBLE Property.

    and write code in OnINIT trigger

    IF the user is NOT CEO then 

    CLEAR(IsVisible)

    ELSE

    IsVisible := TRUE;

  • CDsilva Profile Picture
    4,188 on at

    Hi

    Thanks for your replies.

    I tried this code

    IF USERID = 'CEO' then

    signoff

    else it throws a message

    This too works right.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Rather than doing Hard Coding it is better to do based on parameters.

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    Hey @Chris D'silva,

    Though it solves your case, I will suggest you to go with visibility option, Why even to show that button to those users who has nothing to do on it.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,247 Super User 2025 Season 2 on at

    Chris,

    Either you can use the ROLE assigned to the CEO to disable the action on the page load or add a separate field on the user setup and define who has permissions to that action or not.

    As other members suggested, instead of adding the code control the visibility or enabled option for the action.

    Check this link

    www.archerpoint.com/.../microsoft-dynamics-nav-user-setup-table-and-myth-security

    Thanks

  • CDsilva Profile Picture
    4,188 on at

    Thank you for your suggestions

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans