Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Webservices

Posted on by 225

I am trying to turn on webservices to use for Ebridge and I am getting the following:

<?xml version="1.0"?>

-<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">


-<s:Body>


-<s:Fault>

<faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Types.NavPermissionException</faultcode>

<faultstring xml:lang="en-US">You do not have the following permissions on TableData Page Data Personalization: Read</faultstring>


-<detail>

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">You do not have the following permissions on TableData Page Data Personalization: Read</string>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

I have added the User as an administrator on the server, in sql, on the table and made them a dbowner, and also made them a super user in NAV and added the webpages in webservices. What am I missing?

*This post is locked for comments

  • Pavel Vondruska Profile Picture
    Pavel Vondruska 2 on at
    RE: Webservices

    Hi,
      maybe it will help anybody. I had also this problem and found finally a solution.

    The problem was finally in the user permissions which we used in the WS auth. We had more companies in the database. But the user, we intended to use via web services, had just to a couple of them. To set the user as SUPER to all companies (Just a line with SUPER role and not specified company) solved the problem.

    WebServices on the higher level check, that user has all permissions to all companies, which are on the next level of access. 

    Good luck with NAV to all guys!

    Pavel Von.

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Webservices

    best start with a (new) cronus demo database. you find a backup file in the setup folder of nav. try the whole thing with that database and check if you get the same errors. it's necessary to exclude error reasons step by step.

    additional: for creating/changing nav objects like codeunits, etc. you need a developer license.

    the cu TestFunctions should look like that:

    GetCustomerName provides simply the name of a customer. in the function you need a local variable Customer of type record, subtype customer.

  • Kyle Simpson Profile Picture
    Kyle Simpson 225 on at
    RE: Webservices

    I tried but it wont let me create the codeunit it tells me there are errors in it.

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Webservices

    did you try to use codeunits instead of pages?

    did you try my simple example (simple codeunit)? does it work or do you get an error (the same error)?

  • Kyle Simpson Profile Picture
    Kyle Simpson 225 on at
    RE: Webservices

    that is what I am getting when I remove everything from the web services.

  • Kyle Simpson Profile Picture
    Kyle Simpson 225 on at
    RE: Webservices

    <?xml version="1.0"?>

    -<discovery xmlns:xsi="www.w3.org/.../XMLSchema-instance&quot; xmlns:xsd="www.w3.org/.../XMLSchema&quot; xmlns="schemas.xmlsoap.org/.../&quot;>

    <contractRef xmlns="schemas.xmlsoap.org/.../&quot; ref="10.0.0.5/.../SystemService&quot;/>

    </discovery>

  • Kyle Simpson Profile Picture
    Kyle Simpson 225 on at
    RE: Webservices

    I was able to get the table to run after following the other instructions but the error is still coming up, I have tried several users and nothing has helped.

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Webservices

    check also, if you can open/run table " Page Data Personalization". if you get an error, then is that maybe a cause for the above error message.

    follow https://community.dynamics.com/nav/f/34/t/147642.aspx

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Webservices

    use codeunits for publishing as web service instead.

    to test, if it works in general without error, create a new codeunit (object id >= 50000, name TestFunctions) with one simple function.

    GetCompanyName() : Text

    EXIT(COMPANYNAME);

    publish the codeunit with name TestFunctions. call the new published nav web service using localhost/.../TestFunctions in the web browser. check if that call works fine. if all is ok, create codeunits with the needed  functions for customer access, etc.

    if you get errors with that simple configuration, then there is a deeper system error, which could end with a complete re-install of NAV. and try different users to call the nav web service.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans