
Introduction
The Fichier des Écritures Comptables (FEC) is a mandatory accounting export required by the French tax authority (DGFiP) during tax audits. Companies operating in France must be able to generate the FEC file containing detailed accounting entries in a standardized format.
In Microsoft Dynamics 365 Finance & Operations, the FEC export is generated using the Electronic Reporting (ER) framework through the GER FEC audit file (FR) configuration.
However, during an implementation project I noticed a standard issue in the French FEC model mapping that affects the language of the CompteLib field when generating the report.
This article explains the issue and how to fix it by customizing the French FEC model mapping configuration.
What is the FEC Report in Dynamics 365 Finance
The FEC report is an export of all accounting entries for a given fiscal period.
It must comply with the format defined by the French tax authority and includes fields such as:
- Journal code
- Entry number
- Account number
- Account label (CompteLib)
- Debit / Credit amounts
- Entry dates
In Dynamics 365 Finance, the FEC file can be generated from:
General Ledger → Periodic tasks → Data export
By selecting the FEC report content composition parameter.
One available option is:
1 – FEC Main
This option generates the core FEC accounting file.
The Problem: CompteLib Not Exported in French
When running the report with:
FEC report content composition = 1 – FEC Main
the CompteLib field (account label) may not appear in French, even if the French language is configured in the system.
Root Cause
The issue comes from the French FEC model mapping configuration used by Electronic Reporting.
The mapping retrieves the account translation from the MainAccountTranslation table but does not filter by language.
As a result, the system simply retrieves the first available translation record, which might not be French.
Solution: Customize the French FEC Model Mapping
The fix consists of creating a derived ER configuration and modifying the logic used to retrieve the account translation.
Step 1 – Create a New ER Configuration
- Go to Electronic Reporting → Configurations
- Locate French FEC model mapping
- Create a new derived configuration
- Open the configuration in Designer
This ensures the standard configuration remains unchanged.
Step 2 – Modify the Account Translation Function
Locate the function:MainAccountTranslationByMainAccountRecId
Replace the existing logic with the following calculated field expression:
FIRSTORNULL(
FILTER(
MainAccountTranslation,
AND(
MainAccountTranslation.MainAccount = _mainAccountId,
MainAccountTranslation.LanguageId = "fr"
)
)
).Name
Function definition
#MainAccountTranslationByMainAccountRecId:
Calculated field = FIRSTORNULL(
FILTER(
MainAccountTranslation,
AND(
MainAccountTranslation.MainAccount=_mainAccountId,
MainAccountTranslation.LanguageId="fr"
)
)
).Name
Return type: String
Parameter: (_mainAccountId: Int64)
Result
With this modification, the CompteLib field will always be exported in French, ensuring compliance with the FEC requirements.
Technical Tip: Adding or Modifying Fields in the FEC File
If you need to add or modify fields in the FEC export, you must edit the correct mapping node inside the configuration.
Open the node:
FEC files with details (TblGroup1)
From this node you can adjust:
- exported fields
- data sources
- mapping logic
This is the central point where the FEC output structure is built.
Conclusion
The French FEC audit file report in Dynamics 365 Finance relies heavily on Electronic Reporting configurations.
Because the standard French FEC model mapping does not filter translations by language, the CompteLib field may not be exported in French.
By creating a derived configuration and updating the function:
#MainAccountTranslationByMainAccountRecId
to filter on LanguageId = "fr", you can ensure that the exported account label always complies with French FEC requirements.