Wednesday, 25 March 2015

Get default dimension for a Main account id

Use the below code to get default dimension for any main account id


static void getDefDimMainAccId(Args _args)
{
    RefRecId    defDim;

    defDim = DimensionStorage::getDefaultAccountForMainAccountNum('10000');
 
     info(int642str(defDim ));

}


Wednesday, 18 March 2015

Default a string value in DMF AX 2012 (Instead of creating a generate methods or hardcode in design)

Last week when i was doing an import for employee entity, my analyst told that customer won't provide email description in import file and it was just a textual description which was common throughout my DMF import. First i thought to write a generate method (which is again a time consuming option), then i found an easier way to do it. DMF has build in functionality to pass a constant string/default value. To do that

Steps

1. Go to Processing groups form.
2. Select the entity for which you have pass default value and click Entites.



3. In the Entites screen select modify source mapping.

4. Follow the step in below image

5. Provide default staging value in below screen



6. Click Ok.

That will add your text value in staging.

Happy day :)


Wednesday, 11 March 2015

How RECID is generated in AX 2012 ?

In AX 2012 RECID is created by a store procedure in which is available your transaction database (not model database). The name of the store procedure is sp_GetNextRecId.



Now you can use the same SP to create RECID.  

Friday, 6 March 2015

DMF error "INVALID FUNCTION NAME" while doing Modify target mapping in AX 2012(Custom method added to base entity)

I have created a custom generate method in existing employee entity for DMF . The method what i created was generateNino(). But while modifying target mapping in Target entity form i was getting infolog with following error.


"Invalid function name: generateNino"


Solution:

Just restart the AOS services and try to run Modify target mapping.

Monday, 2 March 2015

Error When open Data Import \ Export parameters screen


When an user open Data Import \ Export  parameters screen, system raises the following error:
"Assembly containing type Microsoft.Dynamics.AX.DMF.ServiceProxy.DmfEntityProxy is not referenced"
"Object CLR object could not be created"
and this issue appeared only when database server is not the same as AOS server.

Step to Resolve
1.  Make sure Microsoft Dynamics AX Data Import/Export Framework Service and AOS server (Microsoft Dynamics AX Object Server 6XXXX-MicrosoftDynamicsAX) has the same service account.

2. Go to Local users and group and Add the same service account to Microsoft Dynamics AX Data Import Export Framework Service Users group. This group folder exist only on system where you have installed "Microsoft Dynamics AX Data Import/Export Framework Service " and not on AOS

3.  Restart the sytem which has Microsoft Dynamics AX Data Import/Export Framework Service .

4. Post any issue exist.