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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

WEB SERVICES - Error

(0) ShareShare
ReportReport
Posted on by

Hi

Can someone help with this error?

When we execute this

http://pre-navr2-2k17.critical.pt:7353/STGCSWDB_PULSAR/WS/CSW/Codeunit/PulsarSOWS

we have this error:

<s:Envelope><s:Body><s:Fault><faultcode>a:System.NotSupportedException</faultcode><faultstring xml:lang="pt-PT">RecordReference</faultstring><detail><string>RecordReference</string></detail></s:Fault></s:Body></s:Envelope>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alexander Ermakov Profile Picture
    28,096 on at

    Most likely the data parameters that are being tried in the web service are not supported. Check the parameters of web service methods.

  • Community Member Profile Picture
    on at

    Hi Alexander

    Tks for your answer and help.

    Tell me a thing, just to understand the functions creation inside Codeunit for WS: can we create some functions to support a Codeunit, which will be used for WS, and put parameters in those functions? What I mean is possible to create a function which we call from WS, and inside that main function can we call others Codeunit functions inside the same Codeunit, where we can have parameters to pass values, or reference to records of tables ? Or is forbidden to create code like that when Codeunit is for WS?

    Like this:

    Main Function

    Call A(SalesLine);

    End Main Function

    A Function(SalesLinePar);

    End A Function

    Is this invalid ?

    By the way, is somewhere any place we can find a document which describe the WS code restrictions?

    Tks from Portugal to Russia !!

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    What I mean is possible to create a function which we call from WS -  and inside that main function can we call others Codeunit functions inside the same Codeunit

    Yes thats possible, there wont be any issue on this. Can you please show us the real code what you really trying to execute?

  • Community Member Profile Picture
    on at

    Hi

    Tks a lot for your answer.

    I did not explain well, looking your answer.

    Let me try again:

    We create a program to call a NAV Codeunit function called UPDATE_SALESLINE.

    Inside that NAV Codeunit we created different functions.

    So, we have that function in that Codeunit which name is UPDATE_SALESLINE. Inside this Codeunit function we have a call to another function CHECK_DIM_VALUES (never called by WS, but used only inside Codeunit); this CHECK_DIM_VALUES is used by UPDATE_SALESLINE and other functions on this Codeunit.

    So … we suspect that if we put as local parameter on CHECK_DIM_VALUES for example SalesLinePar pointing to Record SalesLine, the WS has a problem that do not liked. If we define parameters as Values, Text, Code, Dec, etc.… it seems fine. But functions with Record parameters, which are called by other Codeunit functions which are used by WS, it seems that is impossible, and we suspect that is the reason of the reported error by us.

    Do you know any restrictions on this kind of coding? Is there any restriction that not allow to code record as parameter in a function on WS Codeunits, functions which are only used inside Codeunit ? Is seems that when UPDATE_SALESLINE is running, and call inside the function code another function and this one has Record parameter, the WS is turning confused to pass record parameters ...

    Hope I were more clear now.

    Tks in advance.

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    Ok I think I got your point.

    Here is what you need to do -

    If you are exposing any Codeunit as WebService then it hardly matters which method is getting consumed, If you have any parameter as Record Parameter in your exposed Codeunit  then it violates the protocol and it will not work. So if any function in that Codeunit has Record Parameter then change it. It will solve your case.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi

    I suspected that. Do you know where we can download some information/documents of Microsoft, where we can see the restrictions/Protocol for WS ( Codeunit and Pages )?

    Best tks.

  • Suggested answer
    RockwithNav Profile Picture
    8,637 Super User 2025 Season 2 on at

    I dont think you will something related to this because its all programming and integrating concepts I will say.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans