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

Electronic reporting - Filter on AccountingDistributionTemplate to get Template for Name in company

(0) ShareShare
ReportReport
Posted on by 5

Facing an issue in building an inbound ER file for VendorInvoiceLineEntity  and attempting  to assign an accounting distribution template to the line..

The  AccountingDistributionTemplateId(Template ID): String field does not resolve . It is actually the same with DMF entity - It systematically returns an error cannot find the template even if it exist .

So I tried using TemplateID(TemplateId : int 64 ) instead. This works but require to pass the proper AccountingDistributionTemplate  RecId  ),

To that end I added  to my model : Table records for AccountingDsitribtuionTemplate (  DataAreaId(string),LegalEntity(Int64),Name(string),RecId(Int64 ) and calculated fields to filter according to  TemplateId Name and  the company/legal entity  to get the  appropriate AccountingDsitribtuionTemplate.RecId

For some reasons system always appeared to return records from the  DAT company( if name exist in DAT ) or else Nothing ( when no matching name in DAT ) 

  • The LegalEntity field can not be used . Always reporting error "Evaluating expression for path 'LegalEntity'.Cannot find 'LegalEntity' field in 'AccountingDistributionTemplate' table"
  •  AccountdistributionTemplate ( confirmed via Debug set below ) return all records with DataAreaId = DAT

Is this some bug or do I miss something ? . It makes it impossible to get the specific template ID define for a Legal entity . I actually filtered in 2 time to follow recommendations on Filter with DataAreaId , but this does not help ( beside DataAreaId is not an actual  field in the actual table LegalEntity is , but as a string  )  . Also tried with table record being  set to Cross company or not which make no difference ,  This is quiet confusing 

Debug more returning AccountDistributiontemplate Table records . Return DataAreaId= DAT on all records and throw error on LegalEntity

pastedimage1679321111403v1.png

the actual  table ( systablebrowser ) 

pastedimage1679321183455v2.png

I have the same question (0)
  • xch Profile Picture
    5 on at
    RE: Electronic reporting - Filter on AccountingDistributionTemplate to get Template for Name in company

    Thanks .

    Yes I get the same error both on Debugging and running the ER format and data model .

    Actually I  think it is the datamodel that is somehow corrupted . I noted that the AccountDistributionTemplate fail  using Electronic reporting , but also using import Data management entity, which systematically return error the Value( Name in this case ) does not exist ( even though it definitively exist ) .

    So I suspect given the actual table is somewhat not following general pattern ( No dataAreaId but using instead LegalEntity ) that it did not get properly expressed in the dataModel.

    The Table seem cross company shared (no DataAreaId ) and actually sysTableBrowser is showing all records no matter which company is selected) , but when in the User interface , it does filter  records according to legalEntity matching the current company . This suggest some special logic

    I  Will report the issue to  Microsoft , I was just wondering if there were any mitigations ,but it seem like there are none under current .

  • Suggested answer
    Arcadi  Profile Picture
    788 on at
    RE: Electronic reporting - Filter on AccountingDistributionTemplate to get Template for Name in company

    I've been having problems debugging too, with fields that I know are on the tables, but I get your same error. Have you tried to run the mapping anyways to see if you get the field or the [error]?

  • xch Profile Picture
    5 on at
    RE: Electronic reporting - Filter on AccountingDistributionTemplate to get Template for Name in company

    Yes I understand .

    Problem seem there is some mismatch on the datamodel for AccountingDsitributionTemplate in ER and the Actual Table.

    Actual table feature LegalEntity as string ( when it ought to be a dataarea in truth )

    In ER the data model for that table show DataAreaId as string and LegalEntity as RecId . But neither works ( DataAreaId being DAT on all records as you state correctly ) . While rerrefencing the LegalEntity field in ER always return field does not exist on the table

    So I cannot figure out how and whether it is possible at all,  to resolve in ER a specific AccountDistributionTemplate Recid that match a Name  in a company ( or in LegalEntity as per real table ).

    On importing a vendor invoice line in company USMF( legalEntity)  for instance  referencing a Template defined as per table under another legal entity ) DEMF  for instance ( because they share a same name ) .  It will actually show the Template name on the imported  line ( without throwing any error interestingly ) , but that displayed value is not related to any record in that company ( so it return empty on view details notably ) and in the end it does not distribute  and is just ignored .

  • Suggested answer
    Arcadi  Profile Picture
    788 on at
    RE: Electronic reporting - Filter on AccountingDistributionTemplate to get Template for Name in company

    Is AccountingDistributionTemplate crosscompany? In that case I think dataAreaId will always be DAT (null) and if the record is specific for a legal entity another field like DataArea (or LegalEntity in your case) has the legal entity relation.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 823 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 491 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans