Hello there Experts.
I have a custom table e.g.
Table ID # = 50000
Name = District
that I would like to add to "Web Services" (Form#810).
Problem: The problem is, when I open the "Lookup" for "Object ID", my custom table is not showing on the list.
Can you please advise on what to do for me to expose those custom tables.
Once again, thank you experts.
You cannot expose tables directly as a web service. You can only expose Codeunits and Pages.
The answer is to create a page in the 50000 range using the Table as its source.
You can then expose the page as a web service which will give you access to insert, read, delete or update the table.
Note: ThatI have to refresh my web reference from time to time and also restart the "NAV Business Web Service".
The error you are seeing indicates that you need to flush the object cache. I see this in the RTC also if you make changes to tables and don't restart the services.
I would suggest restarting both the web service and service tier services and try again.
The code snippet you supplied looks right.
I whipped up a test Page of type "Card" and built a quick Vb console app which works fine with a custom page in the 50000 range.