web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Checkbox on form tree control to enable multi select

(0) ShareShare
ReportReport
Posted on by 95

Hi all,

I am adding a tree control to a form and need to add checkbox for each node to enable multi selection. It's the procurement category tree so I am initializing the EcoResCategoryTreeDatasource class and using initRoot() method to get the tree structure. I haven't been able to figure out how to add a checkbox for every item in the tree.

I am looking at the LedgerJournalPostControl form for example. It uses SysFormTreeControl::addTreeItem() method that has a parameter for passing checkbox image for each tree node. Also tried to find \Forms\tutorial_Form_TreeControl but it does not exist in D365.

Can someone please help with this.

Thanks.

I have the same question (0)
  • Verified answer
    WillWU Profile Picture
    22,361 on at

    Hi Priyan,

    You can use check boxes for tree controls in D365FO.

    formTreeItem.stateChecked(FormTreeCheckedState::Checked);
    formTreeControl.setItem(formTreeItem);

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

  • Priyan Profile Picture
    95 on at

    This is very helpful, thank you. I don't know why this article didn't show up in my search.  All the examples I was looking at uses images which is how it was done in AX2012. It has been made so simple in D365 with the checkbox property on the tree control.

  • Awaxx Profile Picture
    229 on at

    Hi WillWU and Priyan

    i have the same question but i need to know where to write this code ?

    Should i write it in a specific treecontrol method or create it from scratch ?

    Thanksfully

  • Awaxx Profile Picture
    229 on at

    Hi,

    is there someone to help on this question ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans