10 Jun’17

Dynamics NAVTo restrict an action button to a particular user in NAV 2017


This article focuses on how to restrict other users and allow only a particular user to user a specified action button in a Page in NAV 2017.

The requirement was such that the page Purchase quote is to be signed off by the CEO and then Purchase order is created. Here, an action button is created called Sign off, where on click of the button, the boolean field called Sign off which is an un-editable field is enabled. Only the CEO should have the access to Sign off the Purchase Quote. The other users should be restricted from signing off the Purchase Quote


Microsoft Dynamics NAV 2017


1. In the NAV Development Environment, create a Boolean field. e.g CEO in the User Setup table.

2. Add this field to the User setup page and enable this field for the CEO user.

3. Create a button Sign off in the purchase quote. Create a new codeunit and subscribe it to the action button Sign off.

4. Create a global variable User Setup in the codeunit and refer the below code.

5. In the Windows client/Web Client, browse to Purchase Quote from the search bar.

6. Edit any Purchase Quote and click on Sign off. Here if the User is not the CEO, in the above image the user is OETIADMIN ,a message is displayed ‘Only the CEO can Sign off this purchase document’

7. If the User is the authorize user to sign off in this case the CEO then the message is displayed as Purchase Quote is signed off.

Written by

Chris D'Silva

Software Developer

2 thoughts on “To restrict an action button to a particular user in NAV 2017”

  1. Hello Katja,

    Thanks for your feedback.

    I have used Boolean filtering because I have to filter only those users with a check on “CEO” field. However, you can use any SETRANGE for filtering.

    – Chris D’Silva

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more