Call a View in Navision

Hello

I created a view in SQL

VwPL as select distinct InvoiceNo,Tax,SUM(Price) as Price from PurchaseLines group by InvoiceNo,Tax

Now I pretend : In a XML File, turning the key to it by InvoiceNo and returned one row per charge.

My problem is, I have a XML file, that uses Purchase Invoice line Record. Returns on line for each line in one Purchase Invoice Line.

What I pretend is Sum all my lines in Purchase Invoice Lines by Vat% and return only one line in My XML file.

I have doubts how to do that in Nav, so I am trying with a View, but don’t know also if it is possible to link a view with Navision.

Thanks

You can access a view in NAV. Create the view in your database. Design the table to match the name and structure of your view. Set the LinkedObject table property to TRUE. In this case you’ll probably also want to set the LinkedInTransaction table property to FALSE.

BP

I created the View and the table in Nav. How can I link to My XMLPort?

Can you give one example how to do it?

BP

How can I link my Table to the View?

The view should be in the same database and have the same name as the table. Did you set the LinkedObject property to True? Once, you set it to true it will look for a view with the same name. You’ll need to ensure the table structure matches the view. You can then use the table as the source for your XMLPort.

Probably this might be of help also: How-to: Use SQL Views in NAV.

Hi Luana,

Did you get an answer to your question? Did it help you? The members and moderators here on DUG use our spare time and help you for free, all we ask in return is that you spent a few seconds to let us know if we helped you solve your problem.

If any of the suggestions helped you solve your question/problem, then please click the “Verify Solution” on the answer that helped you, so that we can see that your problem is now “resolved”. Otherwise let us know how if there is something else you like to know.

Have a nice day! [:)]

Hello Erik

Sorry, but I was on Holydays and even on Holyday sI was Working on Other Projetcs.

At this moment I am working on 3 diferent Program language and SW, and because of that haven’t time to answer to all of your help.

I will do imediatly, because all of you deserve that…

Thanks for every thing