Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

disable options for specific users using Boolean

(0) ShareShare
ReportReport
Posted on by

Hi everyone, I'm using nav 2016 and I need in sales lines to prevent some specific user to delete a sales line record (right button of mouse and delete line ctrl + del)

And I need also to prevent this user of change a item quantity if its unity of meause is different of "kg" (pound).

I want to use a boolean var in the enable check system, but my doubt is how to do this in the delete (in a sales line list of item the user cant delete a specific line for example)

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: disable options for specific users using Boolean

    You can attach to the OnBeforeDeleteEvent event of the Sales Shipment Line and here performing your checks as suggested.

  • RE: disable options for specific users using Boolean

    that's my idea, the "action" i'm looking for is the delete line in sales lines, using the mouse. Did you know how to search for that action?

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: disable options for specific users using Boolean

    If you want a boolean field to enable/disable these actions, you could add the boolean flag to User Setup.

    In the OnValidate of the Quantity field, check User Setup and if the boolean is false (action not permitted) return with an exit(false) or thrown an error.

    Something like:

    UserSetup.GET(USERID);

    If UserSetup.YourFlag then

     //action permitted

    ELSE

     //Action not permitted --> Error

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans