I'm trying to do some object linking (NAV 5.01, SQL 2005) and I'm not doing very well...
Setup:
1) SQL Server A has a table and a view belonging to another (non-NAV) application.
2) SQL Server B (which is running the NAV database) has a (non-NAV) view which references the view on Server A. This works (i.e. opening the view on Server A shows me the data on Server

.
The problem I'm facing is accessing the data from within NAV. I simply cannot figure out how to create a table that links to the view - and judging by the skimpy documentation I've been able to dig up it should be possible to do (it just doesn't say how...)
Anybody got a clue? Am I trying to do the impossible?
Comments
Mean:
for every company one view -> the view must have the name Companyname$Viewname
in NAV the "table" with Porperty LinkedObject YES must have DataPerCompany YES and the Name = ViewName
is the View for all companies the same, the Name of the View is without the Companyname$.
The NAV "Table" has the property DataPerCompany = No and LinkedObject.
1. The view must be in the same database as Navision.
2. The Navision table must have the same name as the view
3. In the table property you must have to set LinkObject to yes
4. Delete the Navision table from SQL Server if the table still exists
5. Set LinkedInTransaction to No if the view connects to a database outside the Navision database
As mentioned in my topic (viewtopic.php?f=23&t=30763&p=149755#p149755) I have to set the SQL Server permissions of the user to db_owner to have this all work but I want the minize the permissions as low as possible. This must be by setting the quest account but this doesn't work for me.
Thanks for your help!
Senior NAV Developer
Elbek & Vejrup
How to display an SQL Server View in Microsoft Dynamics NAV
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
I actually found your blog while googling, and it's very nice. However, it also fails to mention that you need to create the view for each company in the database :?
Senior NAV Developer
Elbek & Vejrup
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Well, I did mention it shortly as "If you would like this view to work for each company, you have to create a separate view for each company".
anyway, when you're compiling in one company, it's only going to check if the view exists in that company. If you're USING the view in another company, it's obvious you have to foresee that seperate view as well... .
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
Well, thing is, it's not an option, it's a requirement.
Senior NAV Developer
Elbek & Vejrup