Add icons on Form Tree Control in D365FO

Hi All, i wanna add icons in FormTreeControl in D365FO

But still can’t find anyway to do that,

I want to know if it’s possible or not, and if icons has been deprecated in D365FO

This capture from AX2012

pastedimage1576147441808v1.png

Here is my actual code, using to show icons in D365FO,

public class IconsTree extends FormRun 
{

public void init()
{

#ResAppl 
    SalesTable _Table;
    TreeItemIdx _TreeItemid;

    super();

    MyTreeView.deleteAll(); //This is my Tree Control on Form
    MyTreeView.lock();

    ImageListAppl dd = new ImageListAppl();
    ImageRes imageRes = dd.image(#ImageFormButtonGroup);

    MyTreeView.setImagelist(dd.imageList());

    while select * from _Table
    {

        _TreeItemid = SysFormTreeControl::addTreeItem(MyTreeView, "Sales Order :" + _Table.SalesId ,FormTreeAdd::Root,  _Table.RecId, #ImageOverlayYellowLock);
        SysFormTreeControl::addTreeItem(MyTreeView, " Customer Account : " + _Table.CustAccount ,_TreeItemid ,  _Table.RecId);
        SysFormTreeControl::expandTree(MyTreeView,_TreeItemid);
        SysFormTreeControl::setOverlayImage(MyTreeView, _TreeItemid, imageRes);
    }
}

}

and the result , no icons :

pastedimage1576147441808v2.png

A reference to the previous discussion in Dynamics Community forum: Show icons of Tree Node control in D365FO.

Hi thank Martin,

I switched here, cause still can’t find any answers, i Don’t know if it’s possible to do it in Dynamics365 FO, if Microsoft deprecated icons on D365FO.

Even standard still using ImageListAppl icons, on multiple classes, but i Don’t know why is Nothing is showed.

In parallel i want to know if there is any other alternatives to do that, show icons with text, like AX 2012.

André told you that it’s not possible. I didn’t explore it by myself, but you seem to be confirming that he gave you the right answer.

Yes, totaly agree, and I think i got the answer, standard control dont allow to do that… after my question was is there alternatives

like Custom controls , WPF controls or others …

  • Check box support in tree controls

docs.microsoft.com/…/check-box-tree-controls,

“… You no longer have to use images to include a check box …”

WPF controls can’t be used in web applications such as D365FO.

You surely can build your own tree control (as an extensible control), but it’s not a trivial task, therefore think carefully whether it’s worth such an investment.