Tags » AX 2012

Querying an external SQL database using .NET Interop

In one of the Dynamics AX implementations I have worked on, there was a requirement to query an external SQL database in order to integrate with an information system. 220 more words

X++

Passing a parameter value from ListPage:MenuItemButton control to a form in Ax 2012 list page

To pass a parameter value from ListPage:MenuItemButton control to a form in Ax 2012 list page below are the steps..

1. For the MenuItemButton control set the AutoDeclaration property “True” 57 more words

AX 2012

"Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics"- error while import .xpo in ax 2012

The below error will come when you try to import and compare the objects from .XPO.

“Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics” 35 more words

AX 2012

AX 2012 - Filter pane vs Ctrl_G in listPage form

I have a listpage form A, its datasource table T has over 40,000 records, and T has around 10 foreight keys; launching the list page A is fine, then it behaves differently: 283 more words

AX 2012

DMF error - 1

When I tried to load zip codes for canada in Beta versionĀ and I tried few times doing this over and over I get the below exception… 227 more words

AX 2012

error : update is not allowed without specifying ValidTimeStateUpdateMode

example code to fix it :

hcmEmploymentEmployee.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
AX 2012

combine main account with default dimension to ledger dimension

example code

public static DimensionDynamicAccount defaultDimension2ledgerDimension(LedgerJournalAC _ledgerJournalAC,DimensionDefault _defaultDimension )
{
    container           conDimName;
    container           conDimValue;
    int                 loop = 1;
    DimensionValue      dimValue;
    Name                dimName;

    DimensionServiceProvider    DimensionServiceProvider = new DimensionServiceProvider();
    LedgerAccountContract       LedgerAccountContract    = new LedgerAccountContract();
    List                        ListValueContract        = new List(Types::Class);
    DimensionAttributeValueContract     ValueContract;
    dimensionAttributeValueCombination  dimensionAttributeValueCombination;
    DimensionStorage                    dimStorage;

    conDimName = Global::getDimensionNameTID();

    while(loop <= conLen(conDimName))
    {
        dimName  = conPeek(conDimName,loop);
        dimValue = Global::getDimensionValueTEC(_defaultDimension,dimName);
        if(dimValue)
        {
             ValueContract = new DimensionAttributeValueContract();
             ValueContract.parmName(dimName);
             ValueContract.parmValue(dimValue);
             ListValueContract.addEnd(ValueContract);
        }
        loop++;
    }

   LedgerAccountContract.parmMainAccount(_ledgerJournalAC);
   LedgerAccountContract.parmValues(ListValueContract);
   dimStorage = DimensionServiceProvider::buildDimensionStorageForLedgerAccount(LedgerAccountContract);
   dimensionAttributeValueCombination = DimensionAttributeValueCombination::find(dimStorage.save());
   return dimensionAttributeValueCombination.RecId;

}
AX 2012