Skip to main content

Posts

Showing posts with the label Dynamics AX

Display Address from multiple to single line in MSD axapta

Display Address from multiple to single line in axapta Mostly we face issue to Display Address from multiple to single line in axapta report in Ax 2009 . Following is the way to do it very easily. Code snaps is as below.. str lineall; ; lineall =lineall +strline(CompanyInfo::find().Address,0); lineall =lineall +strline(CompanyInfo::find().Address,1); lineall =lineall +strline(CompanyInfo::find().Address,2); lineall =lineall +strline(CompanyInfo::find().Address,3); lineall =lineall +strline(CompanyInfo::find().Address,4); lineall =lineall +strline(CompanyInfo::find().Address,5); return lineall;

Microsoft Dynamics AX 2009 Architecture overview

Microsoft Dynamics AX 2009 Architecture With Microsoft Dynamics AX 2009, the full range of functionality is delivered in the first installation. Unused functionality remains hidden until needed and is enabled by entering the appropriate license code into the system. Companies buy appropriate licenses and only pay for modules they use. With Microsoft Dynamics AX 2009, there is no need for integrating and managing multiple systems. Sophisticated customizations can be made without special IT or programming knowledge. Frequently, this process can cost companies significant time and money because changes must be made to multiple forms and reports. But with the Microsoft Dynamics AX 2009 configuration system, the unused features are hidden, not removed, and the process is simple. • The standard Microsoft Dynamics AX 2009 application components are stored in the core layer called the system layer which is controlled and maintained by Microsoft Dynamics. • Country-specific, industry-spe...

Time Zones in axapta 2009

Time Zones Earlier versions of Microsoft Dynamics AX did not support multiple time zones,without setting up an Application Object Server for each time zone. Otherwise,customers who have users spread across multiple time zones needed all the clients to use a single time zone. Microsoft Dynamics AX 2009 supports multiple time zones without the need to set up an AOS for each time zone. Time zone preferences are set at the user level,and information in date and time fields is displayed in the user's preferred timezone. This is helpful for any customer who has Microsoft Dynamics AX users in multiple time zones. All system Date and Time fields have been merged into DateTime fields that store values in Universal Coordinated Time (UTC). Microsoft Dynamics AX 2009 converts all DateTime data to UTC before saving it to the database. Microsoft Dynamics AX 2009 users can select a preferred time zone in which they want to view the DateTime data and the system will automatically convert ...

XML File Code in axapta

XmlDocument doc; XmlElement nodeXml; XmlElement nodeTable; XmlElement nodeAccount; XmlElement nodeName; LedgerTable ledgerTable; #define.filename(@'D:\\New Folder\\accountsxml.xml') ; doc = XmlDocument::newBlank(); nodeXml = doc.createElement('xml'); doc.appendChild(nodeXml); while select ledgerTable { nodeTable = doc.createElement(tablestr(LedgerTable)); nodeTable.setAttribute(fieldstr(LedgerTable, RecId),int642str(ledgerTable.RecId)); nodeXml.appendChild(nodeTable); nodeAccount = doc.createElement(fieldstr(LedgerTable, AccountNum)); nodeAccount.appendChild(doc.createTextNode(ledgerTable.AccountNum)); nodeTable.appendChild(nodeAccount); nodeName = doc.createElement(fieldstr(LedgerTable, AccountName)); nodeName.appendChild(doc.createTextNode(ledgerTable.AccountName)); nodeTable.appendChild(nodeName); } doc.save(#filename);

code to send email directly in dynamics axapta

You can try following code in job to send email directly to particular email. Sysmailer mailer; ; mailer = new sysmailer(); mailer.fromAddress("abc@yahoo.com","abc"); mailer.tos().appendAddress("acx@rediffmail.com","acx"); mailer.subject("Hi"); mailer.htmlBody("Hi"); //mailer.SMTPRelayServer("smtp.gmail.com"); //mailer.attachments().add(@"D:\sd\dfdt.txt"); mailer.sendMail();

Pack the struct into a container in axapta

Struct s = new Struct(Types::Integer, "age", Types::String, "name"); Struct s1 = new struct ("int age; str name"); Struct copy; container c; int i; ; // Print the definitions print s.definitionString(); print s1.definitionString(); s.value("age", 25); s.value("name", "John Doe"); // Allow self introspection print s.toString(); for (i = 1; i <= s.fields();i++) { print s.fieldType(i), " ", s.fieldName(i); } // Add fields at runtime s.add("Shoesize", 45); // print s.definitionString(); // print s.toString(); // Pack the struct into a container and restore it into copy c = s.pack(); copy = Struct::create(c); pause;

AX 2009 Installation and Configuration Exam

Exam Name: AX 2009 Installation and Configuration Exam Type: Microsoft Exam Code: MB6-820 Total Questions: 100 Page 1 of 23 Question: 1 You work in an International company which is called Luxwet. And you're in charge of the network of your company. Now you work as an installer intending to install multiple application instances. So how is this done in Microsoft Dynamics AX 2009? A. There cannot be multiple Application instances on the same server. B. The installer will need to create a separate logical drive for each application instance. C. The instances can be installed on the same machine, but the installer must provide a separate root directory for each application. D. The installer supplies an application instance name for each instance. Then, all applications are installed in the same root folder. Question: 2 You work in an International company which is called Luxwet. And you're in charge of the network of your company. Now you work as...

Get ODBC Type using axapta code

Get ODBC Type using axapta code ODBCConnection connection; SqlSystem sqlSystem = new SqlSystem(); LoginProperty loginProperty = sqlSystem.createLoginProperty(); Statement statement; ResultSet resultSet; SqlStatementExecutePermission sqlStatementExecutePermission; str sqlStatement; loginProperty = sqlSystem.createLoginProperty(); loginproperty.setOther(strfmt('dsn=abc;uid=xyz;pwd=dds')); connection = new ODBCConnection(loginProperty); statement = connection.createStatement(); sqlStatement = "select * from test "; sqlStatementExecutePermission = new SqlStatementExecutePermission(sqlStatement); qlStatementExecutePermission.assert(); resultSet = statement.executeQuery(sqlStatement); while(resultset.next()) { info(strfmt("%1 %2", resultset.getString(1), resultset.getString(2))); }

Create a new number sequence

Creating a new number sequence is achieved by creating a new reference for the sequence. Follow these steps to create a new number sequence: 1. Create a new Extended Data Type (EDT). Often this EDT extends num. This is not mandatory, but it is a best practice. 2. Decide which module’s parameters this number sequence reference should be included in, and find the corresponding NumberSeqReference sub class. 3. The loadModule() method shows a number of blocks of code, which creates records in the table NumberSequenceReference. 4. Copy one of these blocks and change the following fields: a. DataTypeID is the type Id of the new data type. b. referenceLabel is the description shown in the left column of the Number sequence tab on the parameters form. c. referenceHelp is the longer description of the reference shown in the top part of the Number sequence tab of the parameters form. d. sortfield defines the sequence that the references are displayed on the Num...

Microsoft Dynamics AX certification

Microsoft Certified IT Professional: Applications for Microsoft Dynamics AX 2009 Note You must pass one required exam and three elective exams to obtain a certification. Exam title Exam number Required: Financials in Microsoft Dynamics AX 2009 Exam MB6-818 Elective: Trade and Logistics in Microsoft Dynamics AX 2009 Exam MB6-817 Elective: Development Introduction in Microsoft Dynamics AX 2009 Exam MB6-819 Elective: Production in Microsoft Dynamics AX 2009 Exam MB6-822 Elective: Project Series in Microsoft Dynamics AX 2009 Exam MB6-823 Elective: Human Resource Management in Microsoft Dynamics AX 2009 Exam MB6-824 Elective: Product Builder in Microsoft Dynamics AX 2009 Exam MB6-826 Elective: Payroll in Microsoft Dynamics AX 2009 Exam MB6-827 Microsoft Certified IT Professional: Developer for Microsoft Dynamics AX 2009 Note You must pass two required exams and two elective exams to obtain a certification. Exam title Exam number Req...

Axapta Coverage

As per my experience and knowledge following places in India have nice axapta market. 1 Mumbai- Here Godrej infotech,TCS(Tata consultancy Services),NDS,L &T Info-tech etc working well in Axapta and lot of other companies also implemented Axapta. 2. Ahmedabad:- DevITP(Dev Information technology Pvt. Ltd) Ahmedbad,Indusa etc 3. Vadodara:- TDW,GERI(Gujarat Engineering Research Institute)  implemented Axapta etc 4. Pune 5. Bangalore 6. Hyderabad-Accenture 7. Delhi 8. Jaipur 9.Udaipur 10.Gurgaon 11.New Delhi 12-Gandhinagar-Gujarat Other Place like  Jamnagar etc also have good scope for axapta.

Struct

Struct A struct can be viewed upon as a class with no method, only attributes. It can store several values of different data types, but one struct can only hold one set of values. static void Collection_Struct(Args _args) { // Create a struct with two fields struct myCar = new struct ("int ModelYear; str Carbrand"); int i; ; // Set values to the fields myCar.value("ModelYear", 2000); myCar.value("Carbrand", "BMW"); // Add a new field and give it a value myCar.add("Model", "316"); // Loop through the fields of the struct for (i=1; i<=myCar.fields(); i++) { info(strfmt("FieldType: %1, FieldName: %2, Value: %3", myCar.fieldType(i), myCar.fieldName(i), myCar.value(myCar.fieldName(i)))); } }

Map in Microsoft Dynamics Axapta

The map is used to index a value using a key value. Both the key and the value can be of any types specified in the Types enum. static void Collection_Map(Args _args) { // Create a new map with a key and value type Map cars = new Map(Types::Integer, Types::String); MapEnumerator mapE; ; // Insert values to the map cars.insert (1, "Volvo"); cars.insert (2, "BMW"); cars.insert (3, "Chrysler"); // Display the content of the map info (cars.toString()); // Get the enumerator to loop // through the elements of the map mapE = cars.getEnumerator(); while (mapE.moveNext()) { info(strfmt("Car %1: %2", mapE.currentKey(), mapE.currentValue())); } }

Increase Serial number in axapta through code

This is sample code to Increase Serial number in axapta through code. There are two way to set serial number one is number sequence other is maintain sequence number by code. This is way to increase serial number if you do not want to use number sequence . display str privateMethod() { int ss=0; str SrNo; ActualWorkDet actualWorkDet1; Query query; QueryBuildDataSource queryBuildDataSource; QueryBuildRange queryBuildRange; QueryRun queryRun; int total; ; //itemid="CN-01"; //itemid=Itemhead.itemid(); itemid=ActualWorkHead.ProdId; if (itemid != "") { query = new Query(); queryBuildDataSource =query.addDataSource(tableNum(ActualWorkDet)); //queryBuildDataSource.addSelectionField(fieldNum(CopyOfItemRoutesDet,SrNo),SelectionField::count); queryBuildDataSource.addSelectionField(fieldnum(ActualWorkDet,SrNo), SelectionField::Max); //queryBuildDataSource.orderMode(OrderMode::GroupBy); queryBuildRange =queryB...

Example of Fetch Method in Axapta

This is sample code for fetch method for Ax reports. In this code you can get idea that how to add or find range on report ,How to add data source for table in report,how to user queryrun on report. How to send data to table to show on report and how to execute section on report. public boolean fetch() { boolean ret; // ret = super(); _Test _Test1; QueryBuildDataSource qbds; QueryBuildRange TestId2; Query q = new Query(); int i; str stri; str rowid; TestId testid1,oldtestid; ; q = this.query(); /* qbds = q.dataSourceTable(tablenum(_Question)); qbds.addRange(fieldnum(_Question,TestId)); TestId2=qbds.findRange(fieldnum(_Question,TestId)); queryRun = new queryRun(q);*/ qbds = q.dataSourceTable(tablenum(_Test)); qbds.addRange(fieldnum(_Test,TestId)); TestId2=qbds.findRange(fieldnum(_Test,TestId)); queryRun = new queryRun(q); oldtestid=""; while (queryRun.next()) { // _question = queryRun.get(tablenum(...

add run time control in axapta

This is a sample code to add run time control in axapta form. This is not 100% accurate code but this can help you to create run time control. There is no guarantee that  run time control will work perfectly in Ax I tried it but did not get much success on this but what success I get I shared here. public void init() { int i; int a; int d; int j=0; str lable; DictTable dictTable; TableId tableID; //TestId testId1; FormStringControl fStringTestID; str GetParm; str ParmCaller; ///// FormBParams formBParams; Array items; object formRunCaller; //FormRun formRun; //Args args; ; // if( element.args() ) // { // get string parameter // testId1= this.TestID() ; formRunCaller = element.args().caller(); if(formRunCaller) { testId1=formRunCaller.MethodA(); } // } //ssss /*if(element.args()) { testId1=element.args().parm(); } if(element.args().caller()) {//element.args().record...