Options

Navision Application Server - Permission Error

craigbarbscraigbarbs Member Posts: 60
I'm using application server to export Posted Sales Invoices and Credit Memos. When exporting the records, they need to be flagged as having been exported. The problem however, is that I get a permission error in the event viewer when running application server using the customer's license.

If I run the same export program from a normal client, I do not get the permission error.

Is there anything special that needs to be done to accomplish this?

The codeunit has the required permissions, the windows login being used by application server is a super user. I can't think of anything else that needs to be done.

Comments

  • Options
    kinekine Member Posts: 12,562
    Is the licence on Application server fresh? Don't you use some old version of licence? Check it...

    Which objects you are using for export?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    craigbarbscraigbarbs Member Posts: 60
    I think the license used by application server is one used by the Navision Server. I did however copy the license to the install folder of application server and it did not help.

    The codeunit that I'm using is one that I have written specifically for the task. I have given this codeunit the required permissions. When running the codeunit from the object designer, I do not get the same permission error.
  • Options
    ArhontisArhontis Member Posts: 667
    Ok, the user the application server uses is super user, but perhaps the windows account that the application starts as, doesn't have the permission to write the file to disk! have you checked that? Maybe its not a navision permission error but a windows permission error...
  • Options
    Rob_HansenRob_Hansen Member Posts: 296
    This is just a side comment. I performed some similar work with the application server and found that permissions seem to be a bit buggy. It was a similar scenario - the windows login used for the application server was a SUPER user, it was triggering a custom report to modify the Check Ledger Entry table, and the report had explicit permissions granted. A permission error was encountered, but the process worked fine when logging in as that user and running it manually. I temporarily added an ERROR trigger to the routine to report the logged in user id in the event log, and it confirmed the correct account WAS being used. In the end I added a function to a custom codeunit to handle modifying the Check ledger Entry (passing the record in from the report), and gave the codeunit permission to modify the table. At that point the process worked correctly, but it sounds like it isn't for you. I don't have a further suggestion - I just wanted to mention that I struggled with a similar issue, so there may be some bugginess in the application server with respect to permissions.
  • Options
    craigbarbscraigbarbs Member Posts: 60
    I was mistaken in my first message. I'm using Application server to fire off a codeunit, but the tables in question were actually updated by a report. I changed the update to use a codeunit instead, and it solved the license issues I was having.

    Thanks to both of you for your input on this one!
  • Options
    JanStepanekJanStepanek Member Posts: 6
    Hello, I find same error as you and I escale to the Microsoft support. This is answer from Microsoft soppor:

    Hi Jan,
    your request regarding the NAS and ignoring report properties has been registered for correction with the high priority. It's planned that this issue will be corrected in the version NAV 4.0.A but I'll watch its status and give you an updated information about the timeline for correction if there's some. As a workaround solution please use the codeunit.


    For modify record from report I call codeunit functions (its works correctly).

    Report:
    .....
    //Rec.Modify;
    Codeunit.FunctionModifyRec(Rec);
    .....

    Codeunit
    FunctionModifyRec(Var Rec as ...)
    Rec.Modify;
Sign In or Register to comment.