Skip to main content

Posts

The type or namespace name 'Portal' does not exist in the namespace MSD Ax 2009

Getting Error on build EP website in Visual Studio for Axapta 2009. The type or namespace name 'Portal' does not exist in the namespace 'Microsoft.Dynamics' (are you missing an assembly reference?). Solution: Solution for this error due to proxy classes required for this user control because its used in namespace. You need to take below step for the same. To fix  this error just go to your project and right click on the App_Code node in your solution explorer then select "Generate Proxies" option .  This process may take time for  building all of the classes from your proxy.  Now check again the build works for your project and its updated with your code. Proxy objects located on below folder. C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_Code\Proxies

Sample code Example of Array in MSD Axapta

This is  Sample code  Example of Array in Axapta . str name; Array Arr = new Array (Types::String); int i= 1, j; Int test; TestTable TestTable; ; // Create an Str array // Write some elements in it while select TestTable { Arr.value(i, TestTable.TestTables);//(i, i*2); i++; } j = i; for (i = 1; i<j; i++) { test= Arr.value(i); while select TestTable where TestTable.TestTables == test { info(strfmt("%1", Arr.value(i))); } }

Job to import text file data to Table in MSD axapta

I want to share code to  import text file data to Table in axapta. Here is sample of one field taken in text file. #define.ioRead("r") Dialog dialog = new Dialog('File Upload'); Dialogfield dialogfield; DialogField dialogFileName; InventTable inventTable; ItemID itemID; FileIOPermission fileIOPermission; CommaTextIo io; container inLine; int lineNum; int i; ; dialogFileName = dialog.addField(typeid(FilenameSave)); dialog.run(); if(dialog.closedOk()) { fileIOPermission = new FileIOPermission(dialogFileName.value(), #ioRead); fileIOPermission.assert(); io = new CommaTextIo(dialogFileName.value(), #ioRead); if (io) { ttsbegin; while (io.status() == IO_Status::Ok) { inLine = io.read(); if (io.status() != IO_Status::Ok) {