Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Tuesday, July 24, 2018

Find your changes and code fragments inside of extension project in D365

New D365 is enabled with powerful object search. These two tricks will help you to find even more inside of you extensions.

To find any text fragment you can use VSTS search tool.





To find all changes done in an extension you can simply take a look at the XML file behind.




Thursday, January 16, 2014

How to set properties for the Reference Group form control from code

There is a small issue in AX 2012 with getting access to the siblings' properties of Reference Group form control - they are unavailable in AOT.

However, you still can get access to it from code during run time.

Let's say you have placed on your form a field named FilterCategory, which is a reference group, and you want to set its sibling FilterCategory_Name width to Column width value. As you can see there is no way to do that in AOT.



So you just create a method supposed to be called in the form init():

void setColumnWidthForFilterCategory()
{
    int                                 i;
    Object                              childControl;

    for (i = 1; i <= FilterCategory.controlCount(); i++) // FilterCategory is of FormReferenceGroupControl type
    {
        childControl = FilterCategory.controlNum( i );
        childControl.width( 0, FormWidth::ColumnWidth );
    }
}

And you get it!