Wednesday, October 7, 2015

How to make dimension mandatory in ax 2012

I want customer dimension mandatory when creating a new customer

Form> CustTable > Method

public boolean checkcustomer(RecId _ledgerDimID)
{
    DimensionAttribute                  dimAttr;
    DimensionAttributeValue             dimAttrValue;
    DimensionAttributeValueSetItem      dimAttrValueSetItem;
    RefRecId                            defaultDimension;
    boolean                             ret;
    ;

    defaultDimension    =   _ledgerDimID;

    dimAttr             =   DimensionAttribute::findByName('Customer');

    select firstonly RecId, DisplayValue from dimAttrValueSetItem
                where dimAttrValueSetItem.DimensionAttributeValueSet == defaultDimension
            join dimAttrValue
                where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue &&
                dimAttrValue.DimensionAttribute == dimAttr.RecId       &&
                dimAttrValue.IsDeleted == false;

    if (!dimAttrValueSetItem.DisplayValue)
    {
        ret  = checkFailed("Customer dimension must be specified.");

    }
    else
    {
        ret = true;
    }

    return ret;
}

go to form level custtable datasource  validateWrite method 

 if(element.checkcustomer(CustTable.DefaultDimension) )
    {
       ret = true;
    }
    else
    {
        ret = false;
    }

Saturday, August 22, 2015

Combine XPO Tool

Combine XPO Tool is a command line program that combines a set of interdependent XPO files into a single XPO.
 For example, if a team of developers is making code changes to different aspects of an application, they can use this tool to merge those changed files into one XPO file.
As of AX 2012 R2, the Combine XPO Tool is available in the Microsoft Dynamics AX\60\Management Utilities folder. 
for more information :

Wednesday, March 4, 2015

Displaying INR symbol in Ax 2009

In  Currency table copy and paste INR(₹)


and write a display method in report.

display CurrencySymbol INR()
{
       ;
   return Currency::find(CustInvoiceJour.CurrencyCode).Symbol;

}

Thursday, November 20, 2014

Application Modules in Ax 2012

Application modules: Home, Organization administration, and System administration.
The Home application module should provide menu items pertinent to general application users for features that are not tied to a specific application module. Clicking the Home module button should display the logged-on user’s Role Center (if installed) as well as a link to the Home area page. If Role Centers have not been installed, clicking the Home module button should display the Home area page.
The Organization administration area page should be reserved for menu items that cross the application modules in Microsoft Dynamics AX and are related to business functionality. This application module should be used for menu items for business process-related features. Conversely, links associated with the support and operation of the ERP system software should be placed in the System administration area page.
Note: The Organization administration module in Microsoft Dynamics AX 2012 contains functionality that was in the Basic and Administration modules in earlier releases of Microsoft Dynamics AX.
The System administration application module is reserved for product-wide menu items that directly support the operation and function of the ERP software and servers. This area page should be used for list pages, forms, and setup and configuration menu items for software system-related features. Conversely, links associated with the support and operation of the business applications should be placed in the Organization administration area page.
Note: The System administration module contains functionality that was in the Basic and Administration modules in earlier releases of Microsoft Dynamics AX. The Basic and Administration modules have been removed from the product.

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...