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, ...
Unanswered

How to filter D365 Modules by current company ?

(0) ShareShare
ReportReport
Posted on by 229

Hi guys,

I got a table containing all modules going from parent module to childs items and their path.

I got the region code property field coming from this modules and other field like path, labeldid and so on.

Then i wanna use this table in a tree control but i wanna display only modules corresponding to current company like USMF.

My actual issue is to obtain the right modules only, cause i made a filter on region code field but some items are empty or some region code are shared between many items that i dont need.

Could you teach me a way to do it correctly ?

Thanksfully.

I have the same question (0)
  • Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi Mack,

    Are you using a standard table or have you created a custom table that contains data of all the modules?

  • André Arnaud de Calavon Profile Picture
    301,035 Super User 2025 Season 2 on at

    Hi Mack,

    What exactly is your definition of a module, parent module and child items? Is the parent module e.g. Accounts payable and Accounts receivable and a module Inquiries or Setup? Is a child item a menu item?

  • Awaxx Profile Picture
    229 on at

    Hi Gunjan Bhattachayya

    I'm using a custom table where i took all modules from the AOT with all parent nodes and child items.

    Thanksfully.

  • Awaxx Profile Picture
    229 on at

    Hi Andre Arnaud de Calavon

    My definition of a Module is like :

    Menu AOT Tree

    Module (Parent) Accounts payable

    Child Node ------------------------->Vendors

    Child item ------------------------------------> all vendors

    and so on ....

    Maybe i'm wrong with the words, but it's my own understanding.

    Thanksfully.

  • Awaxx Profile Picture
    229 on at

    Nothing ??? No one to help ???

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    So you're actually talking about a menu, right?

    Can you elaborate your problem, please? You said: "My actual issue is to obtain the right modules only, cause i made a filter on region code field but some items are empty or some region code are shared between many items that i dont need."

    But what do you mean by "some items are empty"? That they don't have a region code? It's a actually very simple case - they're used for all regions and therefore you won't filter them.

    And of course that one region code can be used on many menu items. If it wasn't the case, it would mean that each country can have just a single country-specific menu item. What exactly do you mean by saying that you don't need them?

  • Awaxx Profile Picture
    229 on at

    Hi goshoom 

    What i mean is that i wanna only collect the menu which appear on D365 when i set up the company on USMF. Actually its not the case.

    To filter we used selection like this

    (menusLocal.CountryRegionCodes == '')
    || (menusLocal.CountryRegionCodes != '' && strContains(menusLocal.CountryRegionCodes, SysCountryRegionCode::countryInfo(curext())))
    

    Thanksfully.

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Can you tell us more about your problem, please?

    For which menu item doesn't your code behave as expected and which of your codition fails to do the intended job?

    By the way, are you talking about what system administrators see (or there are actually security restrictions applied_ and didn't you forget to take configuration keys into account?

  • Awaxx Profile Picture
    229 on at

     I wanna get that result with all modules on USMF company

    Untitledjhjh.png      

    And for now i got that one in my form

    Untitledmlm.png

    So it's missing many menus like 'account payable' 'general ledger' ... and i got some menus that i don't need like 'landed cost'  'mixed reality' ....

    The condition i wrote before seems to not get all the menus i need and i didnt understand why or how to do it differently.

    Thank you goshoom  for your time.

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    Do you even get menusLocal for these menus?

    I think that the problem is in your logic for getting the list of menus. Unfortunately you've never mention how you do it, therefore it's impossible for us to find the bug in the logic. You'll need to add the missing information.

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 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans