Skip to main content

Posts

How to connect to a website from MSD Axapta and Writing a web page information

How to connect to a website from Axapta and Writing a web page information str pg; str NameofFile; commaIO yourfile; int Object1; WinInet wi = new WinInet(); ; NameofFile = "C:\\test1.txt"; yourfile = new commaIO(NameofFile,"w"); Object1 = wi.internetOpenUrl('http://daynamicsaxaptatutorials.blogspot.in/'); if (Object1) { pg = wi.internetReadFile(Object1); yourfile.write(pg); } wi.internetCloseObject1(Object1); }

Connecting to External Database From MSD Axapta by x++ code

   Connecting to External Database From Axapta by x++ code.Following code works fine. I tried it. CCADOConnection connection; CCADOCommand Cmd; CCADORecordSet RS; CCADOFields fields; Com Coms; Str Sql; Str Provider = "testServer"; Str DataBase = "Testdb"; Str UserId = "abc"; Str PWD = "xyz"; Str ConnStr = strfmt("Provider=SqlOledb;server=" + Provider + ";trusted_Connection=false;" + "Initial catalog=" + DataBase + ";user id=" + userid + ";password='" + PWD + "';"); ; Sql = "Select * from InventTable where itemid="10001""; connection = new CCADOConnection(); connection.open(ConnStr); Cmd = new CCADOCommand(); Cmd.activeConnection(connection); Cmd.commandText(sql); RS = new CCADORecordSet

Calling Sql Stored procedure through MSD axapta code

  Calling Sql Stored procedure through axapta code LogInProperty LogProp = new LogInProperty(); OdbcConnection Con1; Statement stmt1; ResultSet rs; ; LogProp.setServer("SeverName"); LogProp.setDatabase("DataBaseName"); LogProp.setUsername("sa"); LogProp.setPassword("123"); try { Con1 = new OdbcConnection(LogProp); } catch { info("Check username/password."); return; } stmt1 = Con1.createStatement(); rs = stmt1.executeQuery('EXEC [testSTRsp]'); while (rs.next()) { info(rs.getString(1)); }     

Hints for Workflow development for new modules in MSD axapta

Hints for Workflow development for new modules in axapta creating workflows require creating / modifying following workflow artifacts: Workflow Categories  Workflow Templates Workflow Documents Tasks Approvals Workflow Categories To create new workflow categories follow the procedure below: 1. Open AOT 2. Expand the Workflow node 3. Right-click on the Workflow Category node and select New Workflow Category. 4. A new workflow category called WorkflowCategory1 will be created. 5. Right-click on the newly created workflow category and select Properties and set required properties. Property Description Name A unique name for the category Label A meaningful label for the category Ex: Purchase order Help Text Description about the category Module The module to which the category is applicable Workflow Templates Follow the procedure below to create a new workflow template: 1. Open the AOT 2. Expand the Workflow node 3. Right-click on the Workflow Templates node

Set date range to datasource in report fetch method in Microsoft Dynamics Ax

Set date range to datasource in report fetch method using Dynamics Ax querybuildrange  qbr; QueryRun qr = new queryrun(this.query()); ; qbr = qr.query().datasourcetable(tablenum(Inventtrans)).addrange(fieldnum(Inventtrans,DatePhysical)); qbr.value(queryrange(From_Date,To_Date)); element.send(Inventtrans); element.send(Test_1);