New to NAV and trying to test the basic Web Service page and Codeunit features. I'm confused on how you link a specific code unit to an exposed page. I found documentation that indicates I should expose the page in Web Services (I've done this and connected to it) and then create the entry in Web Services for the Codeunit I want to use and assign the same Service Name to the Codeunit as the page I want to link it to and leave the Published flag turned off on the Codeunit.
I have done this however, if I look at the xlm for the SOAP Url for the page, shouldn't I see the Codeunits operations/elements included in the page data so I can access the Codeunits functionality when connected to the page from my developer? I can't see the Codeunit exposed at all.
0
Answers
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
As for testing whether web services are available, you can use a web browser to do so.
This will return a WSDL with the SOAP services currently being offered (modify to match your server and NST names):
http://navserver.domain.local:7047/DynamicsNAV90/WS/CRONUS USA, Inc./Services
And then you can test a particular SOAP offering with a more-specific URL. Inside of NAV, go to Web Services. The SOAP URL for each offered service can be tested in a web browser, and it will give you a list of exposed methods and properties.
http://navserver.domain.local:8047/DynamicsNAV90/WS/CRONUS USA, Inc./Page/SalesOrder
For example, I want to post a purchase receipt. I should be able to publish the purchase order page and link Purch Post codeunit that I made available so that when I connect to the Purchase Order page, update the receipt quantity, I should have access to the codeunit to post the receipt.
Not sure that is how it works but that is what I'm interpreting based on the document.
If I publish the Purchase Order Page and separately publish the Purch Post Codeunit. How would executing the codeunit know what line to post on the PO?
You are correct in your understanding - what you are referring to are extension codeunits for web services and from your description it looks like you are doing it correctly.
The one thing you need to check is that your functions in the codeunit are global - if you are using NAV 2016 then they will be local as default and will not be visible externally (outside of the codeunit).
Regards
Kishor
In the case where I am using predefined 2016 NAV pages and codeunits would it still require me to edit the codeunit to make them visible externally? Also, can any codeunit be an extention to a page? Again, talking specifically about the ones setup in NAV by default.
I'm also confused on the licensing for modification and use of codeunits and pages by my customers. Does the licensing for codeunits and pages refer to any codeunits and pages or just custom/modified codeunits and pages. For example, the Extended Pack indicates it has a "Configuration" that includes 10 codeunits and 100 pages... Confused on what that really means. Does that mean I can only expose and use 10 codeunits (predefined) before paying for more or does that mean I can use any of the predefined codeunits but if I want to create my own or customize any, I can only do that to 10 before I have to purchase additional codeunit licencing?
Sorry for all the questions. Thank you for your help.
Re licensing - once you buy a set of objects you then need to get them assigned to the new objects you have created and want to use in NAV. It does not specifically relate to exposing them as web services.