Roles and permissions trouble

mike.italymike.italy Member Posts: 8
I've created several database users and I've added roles as needed.
I've added some of the standard Navision roles to each user.

When a particular user tries to generate invoice lines selecting shipment lines he gets an error: Combination of userid and password is incorrect.
This happens after he has successfully logged in. He can do everything but executing this function.

Debugging I found the error happens in table 111 Sales Shipment Line in the function InsertInvLineFromShptLine, when the instruction SalesLine.INSERT is executed.

IF SalesLine."Shipment No." <> "Document No." THEN BEGIN
SalesLine.INIT;
SalesLine."Line No." := NextLineNo;
SalesLine."Document Type" := TempSalesLine."Document Type";
SalesLine."Document No." := TempSalesLine."Document No.";
SalesLine.Description := STRSUBSTNO(Text000,"Document No.");
SalesLine.INSERT;
NextLineNo := NextLineNo + 10000;
END;

The user has insert permissions in table 37!!!

Anyone has any suggestion?

Thanks in advance

Comments

  • DenSterDenSter Member Posts: 8,305
    That is strange, that is an authentication error, you shouldn't get that message after you're already in the database. Have you synchronized security?
  • mike.italymike.italy Member Posts: 8
    DenSter wrote:
    Have you synchronized security?

    Sure!

    I've added some standard navision roles to the user.
    I've seen into a few of them there are different references to the sales line table with different permissions (in some cases full read, write, modify and delete, in other cases only read).
    Could it be a conflict between them?
  • ara3nara3n Member Posts: 9,256
    Having same table under different role is not a problem.
    It is strange that they are getting the error.

    Are the users on local network? do they get disconnected?
    Do you SQL Triggers on sales line table?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • mike.italymike.italy Member Posts: 8
    ara3n wrote:
    Are the users on local network? do they get disconnected?
    Do you SQL Triggers on sales line table?

    1) yes, the users are on a LAN
    2) no, they don't get disconnected
    3) i don't think there are SQL triggers on the table

    giving the user the SUPER role it functions! :?
  • ara3nara3n Member Posts: 9,256
    On what version are you? And are you on standard or enhanced security model.

    I'm thinking you are getting the wrong caption for the error, or the user needs to log out and in or you need to synchronize security
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kinekine Member Posts: 12,562
    Some earlier versions of NAV 4.00 had permissions problems. Be sure that you are on actual version...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    mike.italy wrote:
    DenSter wrote:
    Have you synchronized security?
    Sure!
    Are you really SURE that you actually synchronized the security, or you're just sure that you've clicked Tools->security->Synchronize All (or whatver) ?

    You need to assigned to the db_owner or db_securityadmin database roles and at least securityadmin server role to succesfuly synchronize the security.

    Regards,
    Slawek
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Sign In or Register to comment.