Publish NAV 2016 Extensions as webservice

fommo79
Member Posts: 2
Hi,
We have made an NAV 2016 Extension containing two codeunits (added, not modified standard CUs).
We have used such a setup earlier to create webservice functions to call from outside of NAV.
Do you know if it's possible to use Codeunits from an Extension as a published webservice? When we try to publish them, we get this error:
"The field Object ID of table Web Service contains a value (50002) that cannot be found in the related table (Object)"
However, when we use the dropdown we find the codeunit but get a warning saying that
"A RecordId from table 'AllObjWithCaption' cannot be used with a record from table 'Object'.
Does anybody know if this is a common restriction for NAV 2016 Extensions???
We have made an NAV 2016 Extension containing two codeunits (added, not modified standard CUs).
We have used such a setup earlier to create webservice functions to call from outside of NAV.
Do you know if it's possible to use Codeunits from an Extension as a published webservice? When we try to publish them, we get this error:
"The field Object ID of table Web Service contains a value (50002) that cannot be found in the related table (Object)"
However, when we use the dropdown we find the codeunit but get a warning saying that
"A RecordId from table 'AllObjWithCaption' cannot be used with a record from table 'Object'.
Does anybody know if this is a common restriction for NAV 2016 Extensions???
0
Best Answer
-
I just found a solution, perhaps not beautiful but working.
If you create a codeunit with the same object number in the object designer in the dev client it will make the extension CU to be visible to the web service publishing tool. Within NAV client it will only see the content of the created CU (in my case a Hello World), but when it is published and called from the outside it will actually call the functions of the installed Extension CU.
Weird, but at least it's a way to do it and it works perfect. We can call all the functions of the CU without any problem.1
Answers
-
I just found a solution, perhaps not beautiful but working.
If you create a codeunit with the same object number in the object designer in the dev client it will make the extension CU to be visible to the web service publishing tool. Within NAV client it will only see the content of the created CU (in my case a Hello World), but when it is published and called from the outside it will actually call the functions of the installed Extension CU.
Weird, but at least it's a way to do it and it works perfect. We can call all the functions of the CU without any problem.1 -
Hi,
There is an incompatibility with the Table Web Service, the field Object ID is related to table Object!
When you disable that relation you can insert the extension codeunit as webservice.
So I think 2016 is not completely ready yet for what you want.
Have tested this in my 2016 cu4 and I even got a wdsl in my browser.
Perhaps you can insert a record programmatically in the Web Service table to avoid the relation check?
Good luck, fun stuff you are working on!\\The truth exists in seven versions.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions