Tuesday, 29 November 2016

Dynamics AX for Operations- Compilation Tool

Hi guys,
One of my friend explain the compilation tools to complile AX objects. Lets try this tricks.

click this article :
https://axamitblogs.blogspot.in/2016/11/dynamics-ax-for-operations-compilation.html


Tuesday, 19 January 2016

Add Sales Category/Procurement Category field on customized form in AX 2012

Hi guys,

After very long time today i'm writing a new post [AX 2012] 

I had a requirement to customized Sales Category/Procurement category on a new form it is not direct field to add on form. It was little bit tricky. 

I am showing the steps to do this.

Steps 1.
You need to add a int64 field on table and use edt as "SalesCategory".



Now go to the Properties of the SalesCategory field and set edt as salesCatefory. 



Step 2. Go to the form refresh and restore it to reflect the newly created field then expand datasource  and  go to the salesCategory field and add bellow highlighted methods in the snaps.




Paste these methods  into the datasource > field > method.

resolveRefrence

public Common resolveReference(FormReferenceControl _formReferenceControl)
{
    return EcoResCategory::resolveCategoryHierarchyRole(
        _formReferenceControl,
        EcoResCategoryNamedHierarchyRole::Sales);
}

lookupReference method 

public Common lookupReference(FormReferenceControl _formReferenceControl)
{
    return EcoResCategory::lookupCategoryHierarchyRole(
        _formReferenceControl,
        EcoResCategoryNamedHierarchyRole::Sales);
}


Steps 3. Add RefrenceGroup field into the Grid as bellow shown in the snaps. 



Step 4.
Reference field properties set dataSource and Reference field as "salescategory". 
Save  and compile objects.




Step 5. Now you are able to see the sales Category filed on Customized form.



Hope it will help.

Happy DAXing :-)













Import General journal from excel in D365 F&O

 Hi Guys, Import General journal from excel in D365 F&O Code:  using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; u...