Skip to main content

Posts

Showing posts from January, 2011

Join types in microsoft dynamics axapta

OuterJoin Selects records from the main table whether they have matching records in the joined table. Each match returns a result set of the main table record and joined table record joined together as one record. If there is no match, the fields from the joined table will be empty. ExistsJoin Selects a record from the main table only if there is a matching record in the joined table. As soon as a matching record is found, the main table record is returned. The record in the joined table is never retrieved. NotExistsJoin Select records from the main table that do not have a match in the joined table. Passive The query on the joined data source is only executed when the form is opened. A later change in the controlling data source does not change the view. Delayed The query on the joined data source is executed every time that the controlling data source is changed.The query execution is delayed to avoid the fetch of data, if the controlling data source is changed multiple...

OLAP Server Prerequisites

Microsoft SQL Server Analysis Services Select the option to install Analysis Services when running the SQL Server installation wizard. For detailed instructions, see the SQL Serverdocumentation. Microsoft SQL Server client tools Select the option to install the client tools when running the SQL Server installation wizard. For detailed instructions, see the SQL Server documentation. SQL Server Management Studio is installed with the client tools. SQL Server Management Studio is used to administer and process OLAP cubes.

Verify the connection to Reporting Services virtual directories

1. Open Internet Explorer. 2. Enter the URL of the ReportServer virtual directory: If SSL is used the use the following URL. https://ServerName:PortNumber/reportserver(https://ServerName:Po rtNumber/reportserver). If SSL is not used then use the following URL. http://ServerName:PortNumber/reportserver(http://ServerName:Port Number/reportserver). 3. Enter the URL of the Reports virtual directory: If SSL is used the use the following URL. https://ServerName:PortNumber/reports(https://ServerName:PortNu mber/reports). If SSL is not used then use the following URL. http://ServerName:PortNumber/reports(http://ServerName:PortNum ber/reports).

Steps to Create Role Centers in Microsoft Dynamics AX 2009

Steps to Create Role Centers in Microsoft Dynamics AX 2009: I. Create an Enterprise Portal page 1. Launch the Enterprise Portal Website. Go to Administration -> Setup -> Internet -> Enterprise Portal -> Web Sites 2. In the next step, Select Site Actions and select the Create option there. 3. In the New Web Part Page, select a Layout Template and name the .aspx page. Hit the Create button and the new Web part page is created. 4. In the next step, we need to add a Web Part to the Web page. In this case, we will add the Cues Web part which is available under the Miscellaneous section in the Add Web Parts page. The Cues Web part shows a pictorial representation of an important number for a business, such as the number of open sales orders. Click the Add Button to add the Cues Web part to the Web page. The Cues web part is added to the Web Page. 5. Set the Properties of the Web part after adding the Web part to the Web page. Select Modify Shared Web Part to s...

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...

Create a Microsoft SQL Server database from Dynamics Axapta Setup wizard

Use this procedure to install the Microsoft Dynamics AX database on Microsoft SQL Server. If you are installing other Microsoft Dynamics AX components at the same time, the installation screens will vary based on the components you are installing. 1. Start Microsoft Dynamics AX Setup. 2. Step through the initial wizard pages. 3. On the Select installation type page, click Custom installation, and then click Next. 4. On the Select components page, select Database (Microsoft SQL Server), and then click Next. 5. On the Create new SQL Server database page, in the Server name box, type or select the name of the SQL Server computer to connect to. To connect to a named instance of SQL Server, enter it in the format ServerName\InstanceName. In the Database name box, type a name for the new database. 6. Click Next until the component has been installed.

Set Up an AOS Instance as a Batch Server in Axapta

To Set Up an AOS Instance as a Batch Server  in Axapta you can follow below steps . 1. Follow the path Administration > Setup > Server config. 2. On the Overview tab, verify that the Enable Batch check box is marked. 3. Define the time that the AOS instance is available for batch processing 4. Set the Number of batch sessions to 10. 5. Set the Exclusion Start Time to 22:00. 6. Set the Exclusion End Time to 18:00. 7. Close the form.

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 ...

How can I Print datetime value in axapta

How can I Print datetime value in axapta The Microsoft Dynamics AX 2009 application is able to display the date time fields in the appropriate time zone, depending on either the client settings or on the time zone of the location. The time zone used will not depend on the AOS server time zone; the administrator can associate specific time zones with his or her Microsoft Dynamics AX companies and the application will use these time zones for all business processing. UTCTimestamp myDateTime1; ; myDateTime1 = 2007-10-20T14:31:55; print myDateTime1; pause;

Role Centers in dyanmics axapta

A user profile is a set of default information for a specific role in an organization, such as Chief Financial Officer or Accounting Manager. The user profiles determine the content that is displayed on Role Center pages. When a user is assigned to a profile, it specifies which Role Center the user sees when they open the Microsoft Dynamics AX 2009 client or an Enterprise Portal Web page. Developers can create new role centers using the Homepage property. Workflow In Microsoft Dynamics AX 2009, the term workflow is defined in two ways: Workflow is a System Workflow is a system that is included in Microsoft Dynamics AX 2009. The Workflow system provides functionality that can be used to create individual workflows, or business processes. Workflow is a Business Process A workflow represents a business process that defines how a document “flows”through the system by showing who must process and approve it.

How to create user control through enterprise portal

Create User Controls Your own User Controls can be created for use on Enterprise Portal pages. User Controls are created in a Visual Studio Web project. Use the following procedure to create a new user control: 1. Start Visual Studio. 2. Open the Web project for which you are creating a User Control. 3. Select the Web site in Solution Explorer. 4. In the Website menu, click Add New Item. 5. In the Add New Item window, be sure the Language drop-down is set to Visual C#. 6. Click Dynamics AX User Control. 7. Name the new User Control. 8. Click Add. Design a User Control To design a User Control, you use the graphical design view in Visual Studio. There will also be cases where you edit the source for the User Control directly. Use the following procedure to design a new user control: 1. In Solution Explorer, right-click the User Control. 2. Click View Designer to view the graphical layout for the User Control Or Click View Code to view the source that defines the User ...

AOT Display of Layers in Axapta

AOT Display of Layers To select to view the application object layers for any object 1. Select Tools > Options. 2. On the Development tab click the drop-down Application object layer field. Show no layers - No objects are labeled with a layer indicator Show all layers - All objects are labeled with layer indications for  all layers in which they exist Show highest layer - Shows only the highest layer where the object  has been modified Show corrected layers - Shows only objects modified in the current layer or higher and labeled with indication of the highest layer Show all from corrected layers - Shows only objects modified in the current layer or a higher layer, with an indication of all layers of modification.

How to create find method in MSD axapta

How to create find method in axapta public static table find(AddressCountryRegionId _countryRegionId,AddressStateId _stateId,boolean _forUpdate = false) { TalukaMaster taluka; if (_countryRegionId && _stateId && _District && _taluka ) { taluka.selectForUpdate(_forUpdate); select firstonly taluka where taluka.CountryRegionId == _countryRegionId && taluka.StateId == _stateId && taluka.districtId == _District; } return taluka; }

How to Generate group control at run time in dynamics axapta

To Generate dynamics axapta group control at run time in axapta you can try following code. Group is nothing but its one type of control like frame. In that group you can create other control like stringedit,date,enum and extended data types. In group you can set caption,name ,width,height, left,right etc properties . str groupMarkup = ' '; str fieldsMarkup = ' '; str label; str caption; str name; // only generate a group if in a form and not already in a grid if (_inAxFormControl && !_inGridControl && !_inAxGroupControl) { if (controlNode) { name = controlNode.AOTname(); label = controlNode.AOTgetProperty('Caption'); } if (label != '') { caption = 'Caption="' + this.generateLabelMarkup(label) + '"'; } _markup.appendText(strfmt(groupMarkup, name, this.getNextId(), caption)); _markup.appendText('\r\n'); _markup.appendText(fieldsMarkup); _m...

How to Generate dynamics axapta group control using code

This is simple example to Generate dynamics ax group control at runtime using code in x++ lanugage. You can try following code in form. str groupMarkup = ' '; str fieldsMarkup = ' '; if (!_inGridControl && _inAxGroupControl == true) { _inAxGroupControl = false; _markup.appendText(fieldsMarkup); _markup.appendText('\r\n'); _markup.appendText(groupMarkup); _markup.appendText('\r\n'); }

Find Root data source in axapta

Find Root data source in axapta str dataSourcesPath = '\\Web\\Web Forms\\' + _webFormName + '\\Data Sources\\'; str currentDataSourcePath = dataSourcesPath + dataSourceName; TreeNode currentDataSourceNode = infolog.findNode(currentDataSourcePath); str parent = currentDataSourceNode.AOTgetProperty('JoinSource'); str linkType = currentDataSourceNode.AOTgetProperty('LinkType'); // No parent or not an inner or active join if (parent == '' || (linkType != 'InnerJoin' && linkType != 'OuterJoin')) { return dataSourceName; }

Get container to array source in axapta

DictType dictType = new DictType(_arrayFieldTypeId); Source s = strfmt('%1 c2a(container _arrayData) \n',dictType.name()); s += '{ \n'; s += ' int i; \n'; s += strfmt( ' %1 anArray; \n',dictType.name()); s += strfmt( ' for (i = 1; i <= %1; i++) \n',dictType.arraySize()); s += ' anArray[i] = conPeek(_arrayData,i); \n'; s += ' return anArray; \n'; s += '} \n';

Get client type using code in axapta

Get client type using code in axapta SysGlobalCache cache = classfactory.globalCache(); ClientType clientType; Session session; if (cache.isSet(classstr(Global), funcname())) { clientType = cache.get(classstr(Global), funcname(), ClientType::Client); } else { session = new xSession(); clientType = session.clientKind(); cache.set(classstr(Global), funcname(), clientType); } return clientType;

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);

use of OLAP Datasource in axapta

QueryName querySource; OLAPDatasourceRange DSRange; OLAPDatasourceRelation DSRelation; OLAPDatasource datasource; OLAPDatasourceField DSField; Query query; QueryBuildDataSource buildDatasource, parentBuildDataSource; int i,dim, parentIndex; int dsCount; boolean newDim; DictTable dictTable; QueryBuildDataSource ds; QueryBuildRange br; Range _rangeStr; DictTable dictTable1; DictField dictField; ; querySource = 'Bbde'; query = new Query (querySource); dsCount = query.dataSourceCount(); buildDatasource = query.dataSourceNo(1); dictTable = new DictTable(buildDatasource.table()); print dictTable.name(); pause; br = buildDatasource.range(1); dictTable1 = new DictTable(br.table()); dictField = new DictField(br.table(),br.field()); // br.value(strfmt('%1',mkdate(6,6,2008))); _rangeStr = br.toString(); print br; print br.field(); print _rangeStr; pause;

Import data from axapta table to excel through code

SysExcelApplication ExcelApplication; SysExcelWorkBooks ExcelWorkBooks; SysExcelWorkBook ExcelWorkBook; SysExcelWorkSheets ExcelWorkSheets; SysExcelWorkSheet ExcelWorkSheet; SysExcelRange ExcelRange; CustTable custTable; int row=1; ExcelApplication = SysExcelApplication ::construct( ); ExcelApplication. visible(true) ; ExcelWorkBooks = ExcelApplication. workbooks( ); ExcelWorkBook = ExcelWorkBooks. add(); ExcelWorkSheets = ExcelWorkBook. worksheets( ); ExcelWorkSheet = ExcelWorkSheets. itemFromNum( 1); ExcelWorkSheet. cells().item( row,1).value( 'Account num'); ExcelWorkSheet. cells().item( row,2).value( 'Name'); row++; while select custTable where custtable.AccountNum like 'c-000*' { ExcelWorkSheet. cells().item( row,1).value( custTable. AccountNum) ; ExcelWorkSheet. cells().item( row,2).value( custTable. Name); row++; } ExcelApplication. finalize( );

Run the report and send it to a PDF file

EPSendDocument sendDocument; InventTransferJour inventtransferjour ; Filename filename; ; select firstonly inventtransferjour where inventtransferjour.TransferId == 'AB001853' && inventtransferjour.UpdateType == InventTransferUpdateType::Receive; filename = WinAPI::getTempPath() +'MyInvoice.pdf'; sendDocument = new EPSendDocument(inventtransferjour); sendDocument.parmOriginal(true); sendDocument.parmFileName(filename); // Make document will run the report and send it to a PDF file with // the path specified in filename sendDocument.makeDocument();

Configure IIS Application Pool for Business connector proxy account in axapta

Use the following procedure to associate the Business Connector proxy account to the application pool identity. 1. In the left pane of the IIS Manager, expand Application Pools. 2. Right-click Application Pools, and then click New > Application Pool. 3. Enter a name for the application pool, and click OK. 4. Right-click the application pool being used and click Properties. 5. Click the Identity tab. 6. Select Configurable. 7. Enter the Business Connector proxy account user name and password. 8. Verify the password, and click OK. 9. Click Finish to close the wizard

Procedure to install Business Connector

Procedure to install Business Connector 1. Start Microsoft Dynamics AX Setup (Insert the Microsoft Dynamics AX DVD into your drive. If Setup does not launch automatically,double-click the Autorun.hta file in the root directory of the DVD). 2. To begin the installation process, click Microsoft Dynamics AX. 3. Step through the initial wizard pages. 4. On the Select installation type page, click Custom installation, and then click Next. 5. On the Select components page, select .NET Business Connector. 6. Because Business Connector is a type of Microsoft Dynamics AX client, if it is the first client being installed on a computer, Setup requires you to set the display language and the Help language. On the Select display language page, select the language in which you would like to first run Microsoft Dynamics AX. If you later decide to change languages, the user language can be modified within the client. 7. On the Select Help language page, select the Help languages avail...

Enterprise Portal Requirements in Axapta

The Microsoft Dynamics AX Enterprise Portal is created by using existing Microsoft technologies, including: Internet Information Services (IIS), for the portal Web site. Windows Share Point Services or Office Share Point Server for the facilities to create information sharing Web sites, document collaboration, and other services. Microsoft Dynamics AX .NET Business Connector so that Microsoft Dynamics AX business logic and data can be accessed through the portal. Active Directory for security and authentication Hardware and Software Requirements Component Minimum Recommended Processor 2.5 GHz Dual processors, each 3 GHz or faster RAM 1 GB -2 GB Disk 3 GB free space, NTFS formatted partition.or 3 GB free space, NTFS formatted partition, plus adequate space for Web sites Drive DVD DVD Display 1024 X 768 1024 X 768 or higher resolution Network 56 Kbps 56 Kbps or faster

Class and dialog in axapta

DialogField DialogFromDate,DialogToDate; // DateTimeUtil fromDate; // DateTimeUtil toDate; FromDate fromDate; ToDate toDate; DateTimeAccepted tmpdate; protected Object dialog() { Object ret; DialogRunbase dialog; //= super(); ; Dialog = super(dialog); Dialog.caption("Percentage Calculation"); DialogFromDate = dialog.addField(typeid(FromDate)); DialogToDate = dialog.addField(typeid(ToDate)); return dialog; } public boolean getFromDialog() { boolean ret; ret = super(); fromDate=dialogFromDate.value(); toDate=dialogToDate.value(); return ret; } public container pack() { container ret; // ret = super(); return ret; }

Creating dialog through axapta classes

public class Class abc { DialogField DialogFromDate,DialogToDate; // DateTimeUtil fromDate; // DateTimeUtil toDate; FromDate fromDate; ToDate toDate; DateTimeAccepted tmpdate; } protected Object dialog() { Object ret; DialogRunbase dialog; //= super(); ; Dialog = super(dialog); Dialog.caption("Percentage Calculation"); DialogFromDate = dialog.addField(typeid(FromDate)); DialogToDate = dialog.addField(typeid(ToDate)); return dialog; }

Send email alerts in axapta using x++ code

Send email alerts in axapta using x++ code str relayServer; InteropPermission interopPermission; SysMailer mailer; SysEmailParameters parameters = SysEmailParameters::find(); ; if (parameters.SMTPRelayServerName) relayServer = parameters.SMTPRelayServerName; else relayServer = parameters.SMTPServerIPAddress; interopPermission = new InteropPermission(InteropKind::ComInterop); interopPermission.assert(); mailer = new SysMailer(); CodeAccessPermission::revertAssert(); mailer.SMTPRelayServer( relayServer, parameters.SMTPPortNumber, parameters.SMTPUserName, SysEmailParameters::password(), parameters.NTLM ); mailer.fromAddress("test@test.com"); mailer.tos().appendAddress("sdf@dsf.com"); mailer.subject("Test with email setting"); mailer.htmlBody("Testing cc"); mailer.sendMail();

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();

Use of Map in axapta

Args args = new Args(); ReportRun report; Map criteriaMap = new Map(Types::String, Types::String); // Map criteriaMap = new Map(Types::AnyType); ; args.name(reportstr(axsd)); // args.caller(this); criteriaMap.insert("nm","000213"); // criteriaMap.insert("TaxGroup", "Exempt"); args.parmObject(criteriaMap); args.parm("Called Special"); report = new ReportRun(args); report.init(); report.run();

Call Report to form in axapta

Call Report to form in axapta Args args; SysReportRun reportRun; formnm formnm; args = new Args(); args.name(reportstr(reportnm)); reportRun = classFactory.reportRunClass(args); reportRun.query().interactive(false); reportRun.report().interactive(false); reportRun.setTarget(PrintMedium::Screen); reportRun.run();

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...