Skip to main content

Posts

Showing posts from May, 2011

InventTrans entity schema table description in MSD Axapta

InventTrans  The InventTrans table contains information about inventory transactions. When order lines such as sales order lines or purchase order lines are created they generate related records in the inventTrans table. These records represent the flow of material that goes in and out of the inventory. InventTable The InventTable table contains information about items. InventSum The InventSum table contains information about the present and expected on-hand stock of items. Expected on-hand is calculated by looking at the present on-hand and adding whatever is on-order (has been purchased but not arrived yet). InventDim The InventDim table contains values for inventory dimensions. VendTable The VendTable table contains vendors for accounts payable. CustTable The CustTable table contains the list of customers for accounts receivable and customer relationship management.

InventTable entity schema tables description of MSD axapta

InventTable entity schema tables description of axapta InventTable The InventTable table contains information about items. InventItemGroup  The InventItemGroup table contains information about item groups. InventDimGroup The InventDimGroup table contains information about a dimension group. InventTableModule The InventTableModule table contains information about purchase, sales, and inventory specific settings for items. InventModelGroup The InventModelGroup table contains information about inventory model groups. InventItemSalesSetup  The InventItemSalesSetup table contains default settings for items such as Site and Warehouse. The values are related to sales settings. InventItemPurchSetup  The InventItemPurchSetup table contains default settings for items such as Site and Warehouse. The values are related to purchase settings. InventItemInventSetup The InventItemInventSetup table contains default settings ...

Macros in Microsoft Dynamics axapta

Macros in axapta Macros are constants, or pieces of code, that are being taken care of by the compiler before the rest of the code to replace the code where the macro is used with the content of the macro. There are three different types of macros: stand alone macros, local macros, and macro libraries. Macros are typically constant values that are only changed by developers. They are used so that developers don't have to hardcode these kind of values in the X++ code, but rather refer to the macro. The macro libraries can be found in the AOT under Macros. Each of them can contain multiple macros that can be used throughout the rest of AX. To use the macros from a macro library in AX, simply include them in the scope that you would like to use them. The next example shows how to use two different macros from the same macro library in a Job. First we create a macro library that consists of two macros: #define.Text('This is a test of macros...

Inheritance in MSD axapta

Inheritance in axapta One of the central concepts of object-oriented programming is the possibility to inherit functionality defined at a higher level in the system. This can be done by having a class hierarchy where a method in a subclass overrides a method in the super class (higher level). The method in the subclass can still use the functionality in the same method in the super class by using the super function as in this example: public void sellCar() { ; super(); } This method implies that the class that the method belongs to, extends another class where the functionality in the method sellCar is already written or that the sellCar method is defined at a higher level in the class hierarchy in which this class belong. In our example, we have a super class called Car that extends Object, and then we have we have Car_Economy, Car_Compact, Car_MidSize and Car_Luxury who all extend the class Car. Also, they override the toString method fo...

Static methods in MSD Axapta

Static methods in Axapta In AX, you will see that some methods have a method modifier named static. Actually, all the Jobs we have looked at so far have been using the static modifier. This means that the method can be called directly without creating an object. This also off course means that the static classes can't access the protected data defined in the classDeclaration of the class. The modifier is used at the beginning of the method definition right after the method access modifier and before the return value as in the next example: public static void main(Args args) { } To call a static method you use double colon instead of period as you do in object methods: SomeClass::staticMethod()

RunOn property in MSD axapta

The code in AX can run on either the client or the server. The server here will be the Application Object Server (AOS). There are two ways of controlling where objects of a certain class should execute. When developing static methods you can select to use the client or server modifier in the method header like in the example: // This method will execute on the client. static client void clientMethod() { } // This method will execute on the server. static server void serverMethod() { } You can also set the RunOn property on a certain class to make all objects of that class run on either the client or the server. You can also set the RunOn property on the class to CalledFrom. This will make objects of that class execute on the same layer as the method that created the object.

How to use Array in MSD axapta

Array in axapta An array is a list of values that are all of the same data type, as opposed to a container that can consist of values of different types. The list of values starts with element 1. If you set a value to index number 0 of an array, the array is reset. There are two different ways of using an array. You can either use a fixed-length array if you know how many elements (max) you will have in the array. If you don't know how many elements can be stored in the array at run time, you can use a dynamic array. In addition to this, you can also specify something called "partly on disk arrays" that specify how many elements that should be loaded into memory when the array is referenced. This might be a good performance optimization if you have arrays with a lot of data. static void Datatypes_array(Args _args) { // Fixed lenght array str licenceNumber[10]; // Fixed lenght array partly on disk. // 200 elements will be read into memory when this array //...

InitFrom method in MSD axapta

i nitFrom method in axapta Tables that are related to each other share the data that make up the relationship and possibly also other information. When creating new records in the 'many' table in a one-to-many relationship you can create initFrom methods that set the common fields in the table. It can also be used to enter the values in fields in a table from another table. The next example is taken from the BOMTable and shows how it initiates the ItemId and ItemGroupId fields in the BOMTable from the corresponding fields in the inventTable. void initFromInventTable(InventTable table) { this.bomId = table.ItemId; this.ItemGroupId = table.ItemGroupId; }

Network tiers in MSD Axapta

AX 2009 is built as a three-tier solution. This means that it has a data-tier where the data is stored, a logic-tier where all business logic is executed, and a presentation tier that presents information to the user and receives input from the user. As an AX developer you can select to have the piece of code you are writing be run on the client or the server. The client will represent the presentation-tier and the server will represent the logic-tier. The AX server is also called the Application Object Server or AOS. The data-tier consists of either an MS SQL or an Oracle database. There are also two completely different clients available in AX. The regular Windows client, also known as the rich client, is the one most users think of when we talk about the AX client, but there is also a business connector client. The business connector client can be used by a third-party application to integrate to AX, and it is also used by the enterprise portal. In addition to these three layer...

Setting up the MorphX Version Control System in MSD axapta

Setting up the MorphX Version Control System To set up the MorphX Version Control System (VCS) in AX simply press the Microsoft Dynamics AX button (Alt + M) and navigate to Tools | Development tools | Version Control | Setup | Parameters. You should then set this form up like I have done in next screenshot. First of all,you have to select Enable in the Source control status. Then, you need to select the version control type that you would like to use. This book only covers the MorphX VCS, as it is the best option for most AX development. The main reason for this is that it doesn't require each developer to have a full AX installation locally like the Visual Source Safe and Team Foundation Server do. If you are creating a new module for AX, or if you are already using Team Foundation Server, then selecting Team Foundation Server as version control for AX might be a better option. When using the MorphX VCS, the repository is actually inside the AX database, so you will alwa...

Code Hints for Report development in MSD axapta

Code Hints for Report development in axapta There are lot of section in reports like epilog, page header, header, section group,programmable section , footer etc. Its easy to use epilog, page header, header, section group and footer but use of programmable section is cofusing. I want to share some thing about programmable section . For Any programmable section you must set autodeclaration property to yes. For executing programmable section you can use this code Programmable section name . execute. Whatever control you put on programmable section  you need to specify data method and that method you need to define at main section of method where fetch define so effect will come properly. you can set value of that method to fetch method to return value. all return variable should be define in class declaration. if you rememer my mentioned point you will get success to develop report soon.

How to create User Profile in MSD axapta

How to create User Profile in axapta Go to Administration -> User Profiles form. Create a new User Profile. Hit the Ctrl + N button to create a new User Profile. In the User Profile form, enter the Profile ID and within the Description field enter a description for the User Profile that was created. Assign the User Profile IDs to the various users.

Add Role Center page to the AOT in MSD Axapta

To Add Role Center page to the AOT you can understand following steps. Open the AOT. Browse to the Web Menu Items. Right click the URL menu item and select new URL. Right Click on the URL node under the Web Menu Items node. A new URL node is created. The Properties window opens up. Enter the name of the URL and assign a Label to the URL. Set the Home Page property to Yes

Create the proxy account in Active Directory in MSD Axapta EP

Create the proxy account in Active Directory as follows: 1. Create a unique user in Active Directory in the form domain\username, for example, domain\bcproxy. This user must not have the same name as an existing Microsoft Dynamics AX user. For the procedure to add a new user, see the Active Directory documentation. 2. Assign a password to the user. 3. Select the Password does not expire option. 4. Select the No interactive logon rights option. 5. Close Active Directory

Connecting to a New AOS Instance in MSD Axapta

Follow these steps to connect a client to a new AOS instance: 1. Open the Microsoft Dynamics AX Client Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Configuration Utility). 2. In the Configuration target list, select Local client. 3. Click Manage, click Create configuration, and then enter a name for the configuration. Then determine whether to copy it from the active or original configuration. 4. On the Connection tab, click New. Enter the Server name, Instance name, and TCP/IP port of the AOS instance to connect to, and then click OK and exit the configuration utility.

Managing Multiple AOS Instances in MSD axapta

When multiple instances are installed, use the Microsoft Dynamics AX Server Configuration utility to manage all AOS instances. Use the Server Configuration utility to verify that the AOS connects to the correct database and application file server. 1. Open the Server Configuration utility (Start > Administrative Tools > Microsoft Dynamics AX Server Configuration). 2. Click Manage, click Create configuration, and then enter a name for the configuration. Then determine whether to copy it from the active or original configuration. 3. On the Application Object Server tab, validate that the Application file location is correct. 4. In the TCP/IP port field, note which port the AOS is running on.This information is needed to connect to the AOS. 5. On the Database tab, validate that the AOS is connected to the correct database. If not, change it. 6. Click OK to exit the configuration utility

RAID Subsystem in Microsoft dynamics Ax

RAID Subsystem in microsoft dynamics axapta With an ERP system such as Microsoft Dynamics AX 2009, the database server generally stores a very large amount of important data for the business. If this data is unavailable for any length of time, the business could experience significant financial losses. Using a Redundant Array of Independent Disks (RAID) can help reduce the possibility of this loss occurring. Another important aspect for a database server is fine tuning for optimal performance. A RAID disk subsystem can also be used to help achieve this goal. RAID refers to a group of two or more disks managed as a single unit to store the data together with additional, or redundant, information to provide recovery if there is a disk failure. Usually a failed disk in a RAID system can be replaced while the server is still running. This is one benefit of RAID. Read/Write Performance - Hardware RAID controllers divide read/writes of all data from Windows and applications such as M...

Installing Enterprise Portal Developer Tools in Axapta

Follow these steps to install Enterprise Portal developer tools: 1. Start Microsoft Dynamics AX Setup. 2. Step through the initial wizard pages. 3. On the Select installation type page, click Custom installation.Click Next. 4. On the Select components page, select Enterprise Portal developer tools. Click Next. 5. On the Ready to install page, click Install.

How to install the Team Servers from axapta DVD

1. Insert the Microsoft Dynamics AX DVD into the computer that will host the Team Server. The main Microsoft Dynamics AX installation page will be displayed. If the page does not appear automatically, double-click the Autorun.hta file in the root directory of the DVD. 2. Click Additional tools. 3. Click Install Team Server. 4. Step through the initial wizard pages. 5. Select the kind of database: Microsoft SQL Server or Oracle Database Server. 6. For Microsoft SQL Server, type the SQL Server name. Click Next. a. Select Install new Team Server, type the Team Server database name, and then click Next. 7. For Oracle Database Server, type the TNS Service name. Click Next. a. Type the Schema name and Password. Click Next. b. Type the Oracle Role name. Click Next. Type the Team Server user group name. If the group name does not exist, Setup will create the group. Click Next. 8. Click Install

Areas of Proficiency MSD axapta professionals

The areas in which the implementer must be proficient include the following: • Windows Server 2003 or 2008 • Microsoft Exchange 2003 or 2007 • Active Directory • Domain Controllers • Domain Name Services • Networking • SQL Server 2005 or 2008 • SQL Reporting Services • SQL Analytical Services • Visual Studio • Internet Information Services • SharePoint Services • .NET • Web service

Microsoft Dynamics AX Business Connector proxy in MSDAX

This proxy is a Windows domain user account that enables Business Connector to act on behalf of Microsoft Dynamics AX users when user accounts are authenticated with the AOS. A proxy account must be created in Active Directory on the domain controller before Business Connector can be used to authenticate Enterprise Portal users. If the proxy account does not exist in Active Directory, users cannot log on to Enterprise Portal. Microsoft Dynamics AX Setup automates the process of configuring the proxy in various locations on the Enterprise Portal server. Setup prompts for the proxy credentials and then configures the proxy credentials in the following locations: o Windows user groups o IIS o Microsoft SQL Server

Microsoft Active Directory domain controller in MSD Axapta

Microsoft Active Directory domain controller  All Microsoft Dynamics AX users must be listed in Active Directory on your domain controller. For Enterprise Portal, any user accessing an intranet or extra net site must be listed in Active Directory, or those users cannot access the site. Users who connect to Enterprise Portal Internet (public) sites use the Guest account, so they do not need to be listed in Active Directory.

Take care about Dimension customization for sales and purchase in MSD axapta

As per my point of view if you are working with filed dimension in axapta then you need to take care about design time property because It can give you lot of frustration so take care always. if you will try to make dimension field mandatory through design time property to allow mandatory yes then you can face problem like info error on creation of order like item id  compulsory. So try to give this validation through code in active method of header of line tables. Then you will not face any problem. This type of error can come because inventdimid create at the time of order entry creation. so always take care about dimension customization.

Modify a RunBase Class in MSD axapta

Modify a RunBase Class 1. Insert a queryRun variable in classDeclaration. 2. Define the query and initialize queryRun in new(). 3. Modify the pack() and unpack() methods. 4. Implement the methods queryRun() and showQueryValues(). 5. Fields and variables related to “From Account” and “To Account” should be removed from classDeclaration, getFromDialog(), and validate(). 6. Modify the run() method to use queryRun to fetch the records in LedgerTable. 7. Modify the dialog() method to take the correct parameters and insert a call to super().

What are difference between temporary tables and containers in MSDAX

What are difference between temporary tables and containers -> Data in containers are stored and retrieved sequentially, but a temporary table enables you to define indexes to speed up data retrieval. ->Containers provide slower data access if you are working with many records. However, if you are working with only a few records, use a container. -> When you pass a temporary table into a method call, it is passed by reference. Containers are passed by value. i-> When a variable is passed by reference, only a pointer to the object is passed into the method. When a variable is passed by value, a new copy of the variable is passed into the method. If the computer has a limited amount of memory, it might start swapping memory to disk, slowing down application execution. When you pass a variable into a method, a temporary table may provide better performance than a container

Complete syntax of while select statement in MSDAX

Complete syntax of while select statement [while] select [reverse] [firstfast] [firstonly] [forupdate] [nofetch] [crosscompany] [forcelitterals | forceplaceholders] [forcenestedloop] [forceselectorder] [ * | <fieldlist> from] <tablebuffer> [ index [hint] <indexname> ] [ group by {<field>} ][ order by {<field> [asc][desc]} ] [ where <expression> ] [ [ outer | exists | notexists ] join [reverse][ * | <fieldlist> from] <tablebuffer> [ index <indexname> ][ aggregate [sum] [avg] [minof] [maxof] [count]][ group by {<field>} ] [ order by {<field> [asc][desc]} ][ where <expression> ]]<fieldlist> ::= <field> | <fieldlist> , <field> <field> ::= fieldname | <function>(<field>) <function> ::= sum | avg | minof | maxof | count

How to Transfer of Modifications in axapta application in MSDAX

Use the following process to transfer modifications: 1. All AOS instances accessing the application in the source and destination environment must be shut down. 2. The files that contain modifications of application objects (aod) and labels (ald) are copied from the development environment to the destination environment. 3. Delete the .ali files associated with the label files that you are copying. 4. When the AOS is restarted on the destination application, the system will rebuild index files. The file axapd.aoi is the application object index file. This takes a few minutes to be rebuilt. The .ali files deleted in the previous step will also be rebuilt. 5. Open an AX Client, synchronize the database and re-compile the whole application.

TDS settlement after settlement process is possible if any settlement left in MSDAX

TDS settlement after settlement process is possible if any settlement data left Friends if you are facing any problem for tds settlement if any settlement is remaining after settlement process then its possible to settle tds. Just you need to make research and development on following tables which related to tds settlement . tables are TAXWITHHOLDTRANS_IN TAXWITHHOLDSETTLETRANS_IN Fields which can be helpful is TAXREPCOUNTER. TRANSDATE and TAXWITHHOLDGROUP .

Calculating total Tax for transfer order lines for all lines before posting in MSDAX

Calculating total Tax for transfer order lines for all lines It is possible to calculate total tax of transfer order line before posting of order. Just we need to study about tax class in axapta . I have done this this task and completed with in two days.. I feel proud to do this hactic and difficult task but its being possible by studying tax class and tmptax table in axapta.

How to Put single user restriction in MSD Axapta application

How to Put single user restriction in Axapta application After writing code to restrict multiple user login you may face problem to login for admin group to resolve that problem you need to give full right for current client session table. this will come on following path. Navigation Pane -> Administration -> Setup -> User Group -> select user group -> Permission -> Permission tab -> select viewing as SECURITY (INCL. WEB) -> Administration -> Tables -> Current Client Sessions.

How to use arg for output and display menu items in MSDAX

How to use arg for output and display menu items public static void main(Args args) { VendPurchOrderJour vendPurchOrderJour; PurchTable purchTable; ; if(args.dataset() == tablenum(VendPurchOrderJour)) { vendPurchOrderJour = args.record(); select purchTable where purchTable.PurchId == vendPurchOrderJour.PurchId; if(purchTable.CustomsImportOrder_IN == noYes::Yes) new MenuFunction(menuitemoutputstr(TestPurch), MenuItemType::Output).run(args); else new MenuFunction(menuitemoutputstr(TestS), MenuItemType::Output).run(args); } }

Set Best Practice Options in MSD axapta

Best Practice checks are executed to make sure the guidelines for Best Practices are used. The Best Practice checks are executed during compilation or when the Check Best Practices menu item is selected on the Add-ins menu in the AOT. Best Practice checks are only executed with the compiler if the Diagnostic level field in the Compiler setup form is set to Level 4. A complete disabling of Best Practice checks is completed by selecting a diagnostic level lower than Level 4. The tree-structure in the Best Practice parameters form makes it possible to select or clear Best Practice checks. When changes are made, the Apply button becomes available. To accept any changes made in this form, click Apply or OK. The Warning level field lets users select the number of messages they receive caused by ignoring Best Practice checks. The Warning level field can have the following values set: • Errors only - Only checks that produce errors are executed • Errors and warnings - Only checks that ...

Exceptions in Enterprise Portal in MSDAX

Exceptions in Enterprise Portal are divided into three categories • NonFatal   The exception handling code should respond appropriately and allow the request to continue normally. • AxFatal   Indicates that an unrecoverable error has occurred in Enterprise Portal. Enterprise Portal content will not display. Content not related to Enterprise Portal should display as expected. • SystemFatal   Indicates that a serious error, such as out of memory, has occurred and the request must be aborted. Errors of this kind often cause an HTTP error code 500. E.g. Try { // Code that may encounter exceptions goes here. } catch (System.Exception ex) { AxExceptionCategory exceptionCategory; // Determine whether the exception can be handled. if (AxControlExceptionHandler.TryHandleException(this, ex, out exceptionCategory) == false) { // The exception was fatal and cannot be handled. Rethrow it. throw; } if (exceptionCategory == A...

Different access levels for user or user group in MSD Axapta

Different access levels for user or user group No access  The user has no access to the features that link to the security key or any of the sub security keys. View access The user can view the features that link to the security key, but can't update, create, or delete data. Edit access  The user is allowed to view and use the features that link to the security key. Create access  The user is allowed to view and use the features that link to the security key and can also add new records where the security key applies to a table. Full access  The user can view, edit, and even delete records in the specific table.

Navigation pages in MSD axapta

• List pages: Contains a list of records in the content pane and has buttons that start actions on one or many of the records. • Content pages: Used for navigation, and is placed inside the content pane. Can contain records in another format than a list. An example is the organization view . • Area pages: The content of a menu defined in the AOT under Menus is displayed as area pages. The area pages open inside the client content page.

Naming conventions in MSD Axapta

Naming conventions in Axapta • Application object names are mixed case. The first letter of the name is uppercase as is the first letter of each word in the name. This is called Camelcasing (for example: SalesFormLetter). • Methods, variables, and functions have mixed case names with a lowercase first letter. This is called Pascal casing (for example: initFromSalesTable). • Primitive variable types use lowercase names (for example: str).This material is copyright and is licensed for the sole use by ALESSANDRO CAROLLO on 18th December. • All names should be in U.S. English. • Be consistent while naming. • Only tables, base enums, and extended data types should have the prefix 'DEL_'. This prefix is used to indicate that the element will be removed in the next version, and is used by the data upgrade scripts in AX.

Definition of Menu Items in MSD Axapta

Definition of Menu Items Menu Items are pointers to forms, reports, or classes. There are three different types of menu items: Display, Output, and Action.  The display menu items are used to open forms; the output is used to open reports and the action is used to execute a class with a main method.

Definiaion of Queries in MSD Axapta

Queries in the AOT are predefined static queries that can be reused throughout the whole application. A query contains a hierarchy of data sources that defines the data that should be available for the query. Queries can also be used by other elements in AX such as in forms, reports, and classes. You can add any numbers of tables to query.For example salesTable and SalesLine table relation is salesid field you can create query using salesid field. Query can be used with reports. You can add query in datasources.

Definition of Data Dictionary in MSD axapta

The AOT is organized to contain all elements that relate to how the data is stored in the database and those that relate to security, such as the Security Keys,Configuration Keys, and License Keys, under the node called Data Dictionary.  Under this node, you will find tables, maps, views, extended data types, base enums, license codes, configuration keys, security keys, table collections, and perspectives. EDT used to define data type which can be extended to any form or tables. Map use to show related date automatically. View used to show data as per selected tables and range in data source. Perspective used to display data using OLAP. Security key is used to give right to particular user for modules. and configuration keys used to define security module wise.

Disabling Bound Fields through code in Enterprise portal MSD axapta

You can make a bound field as read only or hide the Lookupbutton of the bound field through code in the page load event. AxBoundField boundField = AxGridView1.Columns[i] asAxBoundField; boundField.ReadOnly = true; or AxBoundField boundField = AxGridView1.Columns[i] asAxBoundField; boundField.LookupButtonDisplaySettings = LookupButtonDisplaySettings.Never;

Programmatically reading data from AxDataSourceControl in EP Axapta

To get details about Programmatically  reading data from AxDataSourceControl you can refer below code privatevoid GetData() { DataSourceViewSelectCallback callback = newDataSourceViewSelectCallback(PrintData); AxDataSource1.GetDataSourceView("CustTable").Select(DataSourceSelectArguments.Empty,callback); } privatevoidPrintData(IEnumerable data) { IEnumerator i = data.GetEnumerator(); while (i.MoveNext()) { Response.Write(DataBinder.Eval(i.Current, "AccountNum").ToString() + “<BR/>”); } }

Code for Proxies in Enterprise portal of Axapta

Code for Proxies in Enterprise portal of Axapta If you would like to use your table methods or X++ classes or Enums in managed code, you should add them to proxies file under AOT\Web\Web Files\Static Files\Proxies. Typically Proxies are used if you need to access or update data that’s outside of Dataset or you would like to reuses some business logic in both Client and EP. /table:EmplTable /method:EmplTable.find /enum:TrvExpType /class:EPTrvItemization /method:EPTrvItemization.insertItemizedLines After changing the Proxies file, you can generate the proxies file using Tools->Development Tools -> Development Tools-> Web Development -> ProxiesOr by clicking the Update button in Manage deployment UI. Create the complete URL in code (based Oneb Menu Items) protected override void OnPreRender(EventArgs e) { // Gets the current view to the record selected in the dropdown DataSetView view = dsSales.GetDataSourceView(ddSales.Data...

Access the Current Row and Field value in Enterprise portal

Access the Current Row and  Field value in Enterprise portal private DataSetViewRow CurrentRow { get { try { DataSetView dsv = this.CustomersDS.GetDataSet().DataSetViews["EmplTable"]; return (dsv == null) ? null : dsv.GetCurrent(); } priviate Test() { using (IAxaptaRecordAdapter EmplTable= this.CurrentRow.GetRecord()) { customerName = custTable.GetField("EmplTable").ToString(); } }

Code for Conditionally Making Grid Row Editable in Enterprise portal

Code for Conditionally Making Grid Row Editable in Enterprise portal public partial class AxWebUserControl : System.Web.UI.UserControl { void Page_Init(object sender, EventArgs e) { this.AxGridView1.SelectedIndexChanged += new EventHandler(AxGridView1_SelectedIndexChanged); } void AxGridView1_SelectedIndexChanged(object sender, EventArgs e) { this.EnableGridEditing(this.IsCurrentAccountNumberEven()); } private void EnableGridEditing(bool enable) { if (enable) { this.AxGridView1.AllowEdit = true; this.AxGridView1.EditIndex = this.AxGridView1.SelectedIndex; } else { this.AxGridView1.EditIndex = -1; this.AxGridView1.AllowEdit = false; } } private bool IsCurrentAccountNumberEven() { DataSet dataSet = this.CustomersInfoDS.GetDataSet(); DataSetViewRow currentRow = dataSet.DataSetViews[this.AxGridView1.DataMember].GetCurrent(); if (currentRow != null) { string accoun...

Setting SharePoint Zone Width

protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); //Add style to get 80/20 column widths for the left/right web part zones Microsoft.Dynamics.Framework.Portal.UI.StyleRegisterHelper.SetWebPartZoneWidths(this.Page, Unit.Percentage(80), Unit.Percentage(20)); }

Code to get Get the Bound field in Enterprise portal

Code to get Get the Bound field in Enterprise portal static AxBoundField GetField(DataControlFieldCollection fields, string name) { foreach (DataControlField field in fields) { AxBoundField boundField = field as AxBoundField; if (boundField != null && String.Compare(boundField.DataField, name, true) == 0) return boundField; } return null; } AxBoundField parentCaseId = (AxBoundField)GetField(this.GeneralRight.Fields, "editParentCaseId**")

Code to deploy user control to EP server 64 bit automatically

This is a Code help to deploy user control to EP server automatically. You can get hints here to implement in your customization. xSession session = new xSession(); int pointerSize = 0; ; pointerSize = System.IntPtr::get_Size(); if (session.clientKind() != ClientType::Client &&pointerSize != 4) return SysEPDeployment::getSharepointTemplatePathDotNet(); return SysEPDeployment::getSharepointTemplatePathWin32();

Read data from an AX table using BusinessConnector

Read data from an AX table using BusinessConnector using System; using Microsoft.Dynamics.BusinessConnectorNet; namespace ReadAxRecord { class Program { static void Main(string[] args) { Axapta ax; AxaptaRecord record; Object Id, Brand, Year, mile; try { // Create AX object and logon to AX ax = new Axapta(); ax.Logon(null, null, null, null); // Create an AxaptaRecord object from the // table that will be used using (record = ax.CreateAxaptaRecord("CarTable")) { // Execute the statement entered as parameter record.ExecuteStmt("select * from %1 where %1.test like 'xa'"); // Loop through the result of the statement. while (record.Found) { // Set our local variables to be // equal to the fields in the table // for the current record. Id = record.get_Field("ID"); Brand = record.get_Field("BRAND"); Year = record.get_Field("YEAR"); ...

Code to Call AX class in .Net

Code to Call AX class in .Net using Microsoft.Dynamics.BusinessConnectorNet; namespace InsertAxRecord { class Program { static void Main(string[] args) { Axapta ax; AxaptaRecord record; try { // Create AX object and logon to AX ax = new Axapta(); ax.Logon(null, null, null, null); // Create a new AxaptaRecord object with // the name of the table as input parameter using (record = ax.CreateAxaptaRecord("ABCTable")) { // Remember to clear the tablebuffer if you are inserting inside a loop record.Clear(); record.InitValue(); // Set the fields in the table record.set_Field("ss", "dd"); record.set_Field("dd", ddg); record.set_Field("dd", "dd"); record.set_Field("df", "dff"); record.set_Field("dfd", dfdf); // Insert the record record.Insert(); } // End the AX session ax.Logoff(); } catch (Exception e) ...

Create a configuration file to share ax client in axapta

1. On a client that has local configuration settings and is connected to the appropriate AOS instance, start the Microsoft Dynamics AX Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX Configuration). 2. Verify that the settings in the configuration are those to distribute broadly. 3. Click Manage, and then click Export configuration to file. Name and save the configuration file. 4. Copy the saved configuration file to a shared directory. The user of each client computer must have read permissions on the shared directory.

How to tackle Enterprise portal update problems in axapta

 As we know business connector is main links which connect ssrs,WF,EP,AIF etc to ax or aos (application object server) and aos ,database and domain controller is another strong part of dynamics axapta. some times when we made changes to any web user control then changes did not reflect immediate its reflect after some times. following point you keep in mind if you are developing any EP application. 1. add user control to aot if its newly created. 2. If changes not reflecting then you need to change source code on all three places .net project ,ax aot and ep folder files. 3. If still changes not reflecting then deploy your page again using aot and use iisreset command in command prompt. 4. Instead of restarting iis you need to restart application pool. 5. At last you can use all three opton of refresh aod refresh , data dictionary etc which comes on your ep home menu. I think those all ideas will help you to develop your application of enterprice portal. your feed...

Client server communication in axapta

Client server communication The client communicates with various Microsoft Dynamics AX components as follows:  The client uses the remote procedure call (RPC) protocol to directly communicate with the Application Object Server (AOS). The client never accesses the database or metadata directly. The AOS sends the application objects and data to the client.  Form data sources and queries specified in metadata are the basis of the data layer that is used by the client. In addition, any X++ code that needs to retrieve data can use the built-in language support for querying and manipulating data.  The client uses a report Web Part to interact with the report server. The report control in the Web Part calls the Web services exposed by the report server to display information that is contained in SQL Server Reporting Services reports. These reports can include either transactional data from the Microsoft Dynamics AX application or OLAP cubes from SQL Server Analysis Services. C...

Methods types in axapta

Methods  have the following type modifiers: • abstract: The method is declared but not implemented and subclasses must define it; by default the method is concrete and implemented. • display : The method returns a value used by a field in a form or report and can’t be changed. • edit : The method returns a value used by a field in a form. • final : The method can’t be overridden by subclasses; this modifier can’t be used with constructors and destructors. • static : The method is a class method and is invoked using the “::” notation on the class instead of on an object instance using the “.” notation.

Operators in axapta

Operators in axapta Postfix  [], (params), expression++, expression-- Unary  ++expression, --expression, +expression, -expression, !, ~ Instantiation new, (type) expression Multiplication and division  *, /, %, DIV, MOD Addition *, /, % Shift <<, >> Relational  <, >, <=, >= Equality  ==, != Bitwise  &, ^, | Logical &&, || Ternary  ?, : Assignment  =, +=, -=

principles of conversion between data types in Axapta

 P rinciples of conversion between data types in Axapta • Integers are converted to dates in expressions. • Primitive data types are implicitly converted upward. • Axapta includes built-in conversion functions for explicit conversion between primitive data types. • There is no implicit or explicit conversion between composite data types. • Classes are implicitly converted to their superclass or explicitly by casting. • Tables are automatically converted to a special table class called common.

Database Limitations in axapta

Database Limitations in axapta • The maximum number of rows in one company is 4,294,967,296, as this is the highest record ID possible in Axapta. • The maximum number of bind variables given in the where clause of a select statement is 200. • The maximum number of tables per layer is 7999 in the GLS layer. • The maximum number of tables per layer is 1999 in the DIS and LOS layers. • The maximum number of tables per layer is 9999 in the BUS, VAR, CUS, and USR layers. • The maximum number of user-defined fields in a table is 11439—notice that Oracle has a limit of 1000.

Performance points in axapta

Performance points in axapta How you code access to your data has a major impact on the performance of your code and system; here is a list of rules to go by: • Unless you really need to and have tested the execution plan very well, don’t use hints in database statements; the database optimizer will do a better job, and a bad hint can really hurt performance. • Use table joins instead of using loops to walk through your data; this reduces the number of statements traveling around and the amount of data, plus it offloads processing of data to the database. • Use aggregate functions where appropriate instead of aggregating in code. • If you are deleting many rows that match specific criteria, use the delete_from statement instead of delete, as it performs better. • If you are updating many rows that match specific criteria, use the update_from statement instead of the update statement, as it performs better. • Think well about your indexes: lack of good indexes will lead to ful...

Transactions in Axapta

Transactions in Axapta The X++ language supports three statements that you are probably well-acquainted with to support transactions when performing data manipulation in Axapta: • ttsBegin : Starts a transaction block • ttsCommit : Closes a transaction block and commits the data to the database • ttsAbort : Closes a transaction and rolls back all data manipulation within the current transaction block If data manipulation statements performing inserts, updates, or deletes are not enclosed in a transaction block, Axapta automatically commits with every insert, update, or delete statement. If Axapta terminates abnormally or exits with open transactions, then all transactions not committed explicitly or implicitly are rolled back automatically. It goes without saying that you should lock records that you select for updating by using the forUpdate keyword in X++ select statements.

Virtual Fields in Axapta

Virtual Fields in Axapta ModifiedDate Date the record was last modified ModifiedTime Time the record was last modified, in seconds since midnight ModifiedBy Axapta user who made the last modification ModifiedTransactionID Transaction ID of the transaction that made the last modification CreatedDate Date the record was created CreatedTime Time of creation of the record, in seconds since midnight CreatedBy Axapta user who created the record CreatedTransactionID  Transaction ID of the transaction that created the record TableId ID of the table SequenceNum The same value as in RecId

The Code Profiler in axapta

The Code Profiler in axapta This is a very powerful and advanced tool that you can use to profile your application and find out where time is being used. You can access it from the menu bar by selecting Tools ➤Development Tools ➤Code Profiler. Using it is pretty simple: 1. From the form that is displayed, click the Start button, and if you want to limit the calling depth that you want to profile, then specify it. 2. Run the functionality that you want to profile. 3. Go back to the code profile form and stop the profiler. 4. Finally, use the Profiler Runs button to see the profiler results in the respective form. Analyzing the data collected by the profiles is pretty straightforward for anyone with experience using code profiles. The only suggestion we have is to profile small pieces of functionality and clean up the data that is saved, because the quantities of data that it generates are very large, and you will quickly get bogged down in them if you don’t.

Compiler Output window in axapta

Compiler Output window in axapta The Compiler Output window consists of four tab pages: • Status: This tab page displays a running status of the compilation, where you can see the counts of what the compiler has found. • Errors and warnings: This tab page provides a list of all statements that have either generated an error or a warning with all the information you need to find the code that is causing it. • Best practices: You have seen this tab page earlier on in this chapter. It is equivalent to the Errors and Warnings tab page, but lists best practice violations instead. • Tasks: This tab page lists all occurrences in the code of // TODO: statements. This is a very useful feature when for some reason you lack the information or decisions to enable you to finish off a piece of code. You can insert a comment literally as quoted starting with the TODO: keyword and whatever text you want to follow; the compiler will then list all of your TODOs so you can easily find them again.

Report Sections in MSD axapta

Report Sections in axapta Prologue Introduction to the report that is displayed only on the first page Page header Information to be displayed at the top of every page Header Information to be displayed at the top of a section group Section group A group of information that usually makes up the body of the report Footer  Information to display at the end of a section group Page footer  Information to display at the bottom of every page Epilogue Conclusion of the report Programmable section A block that can be used to add functionality to the report

Views in Microsoft dynamics Axapta

What is Views? Views are a form of transient tables that are populated at run time using their definition and code. There is not much to say here about their properties except for the following: • TitleField1 and TitleField2: As with tables, these specify fields that are displayed in the active title bar of forms. They do, however, have some subtypes that are worth a word or two: • Meta data: A container of data sources that are references to the tables from which the view is populated. • Fields: The fields that the view populates from the specified data sources. • Field groups: The same as in tables. • Methods: As usual, this is where you can add functionality, for example, X++ code, by creating methods. Typically, you would use a view to represent a subset of a table or a joined set of two or more tables.

The most important properties of tables in axapta

The most important properties of tables in axapta • TitleField1 and TitleField2: Specify fields that are displayed in the active title bar of forms • ConfigurationKey and SecurityKey: Specify that only users authorized to access the data can do so. We strongly recommend setting these options. • CacheLookup: Specifies how the table is to be cached to optimize data access. • CreateRecIdIndex: Allows you to create a RECID index. Axapta automatically adds a RECID to every table when its created, so that you can use it as an index; however, if you have a well-designed data model, then that should not be necessary. • PrimaryIndex and ClusterIndex: Specifies which field is your primary and clusteredindex, which requires that you have created the respective fields beforehand. Defining tables consists of creating the table itself and the following subtypes: • Fields: Dictates where your data is actually placed, and when you create these you specify the base data type each holds. How...

Essential steps for developing an application in axapta

1. Obtain all the license codes that you need and install them. 2. Create all the configuration and security keys that you need. 3. Create all the extended data types that you need. 4. Create all base enumerators that you need. 5. Create all the tables that you need. 6. Create all the forms and reports that you need. 7. Create classes as needed to encapsulate functionality that is independent of the data or presentation layers of your application. 8. Create resources as needed. 9. Create queries as needed. 10. Create documentation as you go. 11. Create menus and menu items to allow users to invoke your forms, reports, and jobs,and execute processes represented by classes.

Major areas of the development environment in MSD axapta

The development environment can be divided into six major areas: • IntelliMorph: For designing, editing, and building user interface elements • MorphX: For developing business logic and editing the Data Dictionary • Web MorphX: For developing Web-based applications • X++: For getting around the programming environment and coding • Debugging: For figuring out what you did wrong or could have done better • Best practices: For making sure that you make life easy for everybody and less dangerous for yourself

why you need to attend WPC 2011 as per Microsoft partnership eligibility

If you are eligible for microsoft partnership then why you need to attend WPC 2011  Here are a few reasons why you need to attend WPC 2011: Make Connections and drive revenue for the entire year! Conduct more Business Planning & Strategy meetings in five days than you can in one month, participate in interactive forums and meet with Microsoft executives to plan your future business. Gain a competitive edge ! Microsoft is committed to helping you win against your competition. With inspired keynotes like Steve Ballmer, Kevin Turner, Jon Roskill, 26 business tracks, some 600 sessions and more spread over a five-day format, WPC 2011 provides the key to succeeding against the competition. Microsoft Partner Network : Whether you're an existing Microsoft partner or a leader in the technology industry who's curious about the opportunities offered by the Microsoft Partner Network, WPC 2011 is the place to be.

Change a Module Status in a Period in axapta

Follow these steps to change a module status in a period. 1. Click General ledger, click Setup, click Periods, and then click Periods. 2. Click the period to edit, and then click the Module status tab. 3. In the Module status field, select from the following: • None - Denies everyone access to each selected module • User Group - Gives access to a specific user group Frequently, a company may want to close all the modules, except for the General Ledger during the closing process. They often only allow for specific user groups to enter transactions and leave the period open.Use the Module status tab to control who can post transactions, but not stop the period.

Set the Microsoft SQL Server recovery model to simple

Set the Microsoft SQL Server recovery model to simple Before you begin final preprocessing on the source system, set the source system SQL Server recovery model to simple. By setting the recovery model to simple, you permit the high-performance bulk copy process that is optimal for running the single-user mode preprocessing scripts and bulk copy of the source data to the target system. 1. Open Microsoft SQL Server Management Studio (Start > All Programs > Microsoft SQL Server [version] > SQL Server Management Studio). 2. In Object explorer, select the database to open the Database properties - <database name> form. 3. In the Select a page pane, click Options. 4. In the Recovery model list, select Simple. 5. Click OK.

How to end client sessions in axapta

How to end client sessions in axapta  1. In the Online users form, click the Client Sessions tab. 2. Select the user sessions that you want to end (other than a single administrative user session), and then click End sessions. 3. In the End sessions window, click OK, and then click Close.

Configure SharePoint Services logging

Configure SharePoint Services logging By default, there is no limit on the disk space that diagnostic logging for Microsoft SharePoint 2010 products can use. If you do not specify a limit, diagnostic logging can use all of the space on the hard disk of the Enterprise Search server. Use the following procedure to specify limits for diagnostic logging for SharePoint 2010 products. 1. In SharePoint 2010 Central Administration, click Monitoring. 2. Under Reporting, click Configure diagnostic logging. 3. In the Number of days to store log files section, enter a number. 4. Select the Restrict Trace Log disk space usage option. 5. In the Maximum storage space for Trace Logs (GB) field, enter a number. 6. Click OK. 7. Under Reporting, click Configure usage and health data collection. 8. In the Maximum log file size field, enter a number. 9. Click OK.

Steps to install the Microsoft Dynamics AX databases

Steps to install the Microsoft Dynamics AX databases 1. Start Microsoft Dynamics AX Setup. Under Install, select Microsoft Dynamics AX components. 2. Advance through the first wizard pages. 3. If the Setup Support files have not yet been installed on the computer, the Select a file location page is displayed. The Setup Support files are required for installation. Enter a file location or accept the default location, and then click Next. On the Ready to install page, click Install. 4. On the Select installation type page, click Custom installation, and then click Next. 5. On the Select components page, select Databases, and then click Next. 6. On the Prerequisite validation results page, resolve any errors. For more information about resolving prerequisite errors, see Check prerequisites. When no errors remain, click Next. 7. On the Select databases page, select whether you want to create new databases using Setup or configure existing databases that you created manually. 8. I...