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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

List of a all valid main accounts

(0) ShareShare
ReportReport
Posted on by 208
Hi,
 
I need to provide an entity (ODATA) with a list of all valid main accounts for a third party application in order to choose a valid account from the list. How could I achieve this. Is there any view representing this?
 
Basically the entity should imply the logic (e.g.: main account is part if an active account structure / "Active from" / "Active to" / "Suspended") behind the account reference group lookup in the general jounral to filter only on the valid accounts:
 
 
Thanks for any hint.
 
Sebastian
Categories:
I have the same question (0)
  • Anthony Blake Profile Picture
    2,609 Super User 2025 Season 2 on at
    List of a all valid main accounts
    To second the point made by @Sohaib Cheema, validation is at point of entry and posting, not when displaying the main accounts for selection. Use the full list and validate your entries when they are made.
  • Sohaib Cheema Profile Picture
    47,665 User Group Leader on at
    List of a all valid main accounts

    Main accounts are not just numbers but change their context when used in various scenarios. A main account on its own could not tell about it, whether it is a good or bad account, unless used in a transaction, and there combined with the Financial dimension, the whole combination can pass or fail, based on rules. When I say rules, I speak of Accounting Structure and Advanced Rule Structure. You might be allowed to use one Dimension with a Main account and not with another.

    If rules are not a worry in the equation of this question/post, you can get the list of Main Accounts as those are, and keep having them. There is no harm, unless you want to proceed a step further, with the transaction.

    As soon as it comes to the point when you want to transact (General Journal Line or any journal line), you are looking at validations (for the combination of account with dimension).

    I do not know what you are trying to build there, and what that third-party app is doing, but my gut feeling says it is something to do with integration.


     
  • Suggested answer
    Anthony Blake Profile Picture
    2,609 Super User 2025 Season 2 on at
    List of a all valid main accounts
     
    I've created and tested an example in the D365 Finance APIs Postman workspace here:
     
     
    The request I used is: 
     
    data/MainAccounts?$select=MainAccountId,IsSuspended,ActiveFrom,ActiveTo
     
    Configure your environment and give it a try!
     
    Anthony
     
     
  • Basti Aurand Profile Picture
    208 on at
    List of a all valid main accounts
    Hi Adis,
     
    thanks for the response. As far as I know the MainAccountEntity does not apply the rules defined in "Account structures" (e.g.):
     
     
    So the main account will appear in the list independently if it is part of an active account structure.
     
    Is the condition connected to active accounts structures implemented in any other entity or view?
     
    Thanks
  • Suggested answer
    Adis Profile Picture
    5,410 Super User 2025 Season 2 on at
    List of a all valid main accounts
    Hi,
     
    Check this out
     
     
     
     
     
     
     
    The entity provides active from\to and suspended fields among other information, which you can filter.
     
     
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

     
     

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 708 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 589 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 553

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans