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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Post a sales order by different user id.

(1) ShareShare
ReportReport
Posted on by

Hello,

            Currently I'm working on 'Sales Order' page. Whenever I post a sales order it shows a menu which has three options: Ship, Invoice, Ship and Invoice.

            Now I want a particular user suppose user 'RAJ\HP' & he can only 'Ship' a sales order. He can't post an 'Invoice' & 'Ship & Invoice'

            Suppose there is another user & he only has the permission to post an 'Invoice'. He can't post 'Ship'  & 'Ship and Invoice'.

            How can I do this please help!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at
    RE: Post a sales order by different user id.

    You do not need to customize 81 codeunit and it is not recommended to customize for every small modification as it can be achieved with the use of default version.

    In order to achieve your requirement you can create separate role set and assign related permissions. As an example if a user can only ship the invoice, what you can do is create a separate role and assign the "Sales Shipment Header" and "Sales Shipment Line" table access to the particular user and remove "Sales Invoice Header" & "Sales Invoice Line". By doing this user will not be able to post anything to "Sales Invoice Header". Which means system indirectly block the invoicing access from the user. Same way you can create a separate role for invoicing.

    *Always try for workarounds before jumping into a modification, as it allow a smooth upgrade path to you.

  • Verified answer
    Rabin Profile Picture
    2,976 on at
    RE: Post a sales order by different user id.

    Hie Rajat,

    The way i would approach this issue is by Creating two users that you already have, one for Shipment and one for Invoice.

    Since these are two different department they should not be able to interfere the operations of different department.

    Now, if you want someone to do both the operation(if you have a single department for both ship and invoice) then you may create a user with both the Roles.

    I personally try to customize lesser and try solving the issue with the Configurations and logic.

    In general flow: Warehouse Department does Shipment and then waits for Finance department to Invoice it. NAV gives the way to handle both together but we should not get confused with it.

    Hope my answer gave some perspective on the issue.

    Thank you.

  • Suggested answer
    RockwithNav Profile Picture
    7,952 Super User 2025 Season 2 on at
    RE: Post a sales order by different user id.

    Rajat,

    You need to write the code in Codeunit 81 as there you will find these separate Radio Buttons and how they are called.

    Here you can add some custom fields in user set-up table as "Shipping allowed","Both Allowed","Invoicing allowed"

    Now you should play with these Flags and write your code in Codeunit 81 where Selection is getting assigned and give the error if not permitted.

  • Suggested answer
    Ashwini Tripathi Profile Picture
    4,624 on at
    RE: Post a sales order by different user id.

    You can handle by doing bit customization like on user setup check it and provide selection Menu accordingly or by setting appropriate user Roles.

    If you want to avoid unnecessary coding go for User Role Setup option safe and further configurable.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Post a sales order by different user id.

    Better, you should create different User Roles i.e. One for Shipment and One for Invoice. Further, you can give the relevant rights to the concern users.

    It is not good practice to go for customization for each and every requirements, as Migration becomes very difficult.

    If at all needed as last option,  refer code suggested by Nareshwar, which would certainly meet your requirement.

  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Post a sales order by different user id.

    Hi,

    You can handle this via the permissions sets. But since you have a flat permission structure, I would propose the customized way.

    In the user setup add three boolean fields, say, SalesShipAllow, SalesInvAllow, SalesShipInvAllow and assign the users who have permissions.

    Then write the following highlighted code in Codeunit 81, Sales-Post (Yes/No). UserSetup is a record variable of Table 91, User Setup.

    Check screenshot.

    123455.PNG

    Technically this is the solution. But you have to think about other scenarios which you do need this, especially on the other sales document posting. Double check before using this solution.

  • Amol Salvi Profile Picture
    18,698 on at
    RE: Post a sales order by different user id.

    Hi,

    Think it is bit tricky but you can look at the codeunit 81 and modify based on the user.

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans