.net interop type cannot be used for the classic CSide runtime

Hi all,

I am using Navision 2009 R2. I just tried to use the data type dotnet to implement dot net interoperability which is newly introduced in navision. I used the following code.

xml := xml.XmlDocument();
xml.Load(‘feeds.feedburner.com/MicrosoftDynamicsNavTeamBlog:wink:
items := xml.SelectNodes(’/rss/channel/item’);
FOR i := 0 TO items.Count - 1 DO
BEGIN
title := items.Item(i).SelectSingleNode(‘title/text()’);
MESSAGE( title.Value );
END

xml,title,items are of type dotnet. and subtype of document, xmlnodelist, xmlnode respectively.

I got this code from the document in the installation CD. But i got the error at runtime.

.net interop type cannot be used for the classic CSide runtime

Please provide me a solution for this.

I haven’t played with it too much yet, but I would imagine it is saying that you cannot use that code in the Classic Client. You have to use the RoleTailored Client.

You would want to add an IF SERVICETIER THEN BEGIN around the code to make sure it only executes in the RTC and not Classic.