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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

ER trying to complete format and getting error message Value cannot be null. Parameter name: key

(4) ShareShare
ReportReport
Posted on by 280
I'm trying to complete an Electronic Reporting format that's tested and that can write out an XML-file without a problem in draft mode. I get no errors or warnings when running the validation. But when I try to complete the format, I get this error message:
"Value cannot be null. Parameter name: key"
 
I can't find any discussion on this particular error message. Only for when the parameter name is something different than key.
 
The changes I made recently were adding an XML-segment to the format and a string under it. I've cleared their formulas, doesn't matter, I set them to false, and whether they have formulas or not I can't complete the format and instead get the error message above.
The other change I made was changing the model that the format is based on. I've tried changing version and it doesn't seem to help.
 
When I run compare between the latest completed format and the draft version, the compare never seems to finish. So far I've given up after about 15 minutes. This last run has now been going for 30 minutes.
 
I tried Get this version from the last completed version and redid the changes to the draft version, but still it wouldn't solve the issue.
Update: When I changed the format by getting the previous version, i.e. two versions before the draft version, the problem disappeared. So it appears something was changed in the previous version which introduced the problem. They are both based on the same model version.
 
To sum it up: computer says no.
 
Does anyone have any insights on what this error message might refer to?
 
Update: I have now located that the issue appears/disappears as I change which model version is applied. It seems a bit strange because the two model versions are from 2023-2024, but they haven't been used for this invoice format so maybe that shouldn't be surprising.
Update: When importing the configurations to another environment, the problem doesn't appear. They were not all imported in chronological order, not sure if that could matter. Also I did a rebase of the model mapping in that environment, which may have solved something.
Categories:
I have the same question (0)
  • Suggested answer
    CA Neeraj Kumar Profile Picture
    5,135 Super User 2026 Season 1 on at
    Hi Dan, 
     
    To assist here, I will need more information like 
    1) any error you are getting while Validating the configuration or not? 
     
    2) what is the version number for current format, related model mapping and model. 
     
     
    Regards, 
    Neeraj
  • Suggested answer
    Nisha_Soni_2709 Profile Picture
    97 on at
    hello Dan, 
     
    Is there any field into you mapping which is mandatory. If yes then assign static value to it.
  • Adis Profile Picture
    6,702 Super User 2026 Season 1 on at
    Hi,
     
    I can only add to the other replies, we need more information. Screenshots would be best.
     
    • Error message (screenshot)
    • Format configuration name. If you created a new one, from which one did you derive it. Does the original work, in case you are using a customized one?
    • which model mapping are you using
    • which model are you using
    What may cause the issue, is that there is a validation in the format that stops the creation because the value is 0.
     
     
     

    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

  • Dan P Profile Picture
    280 on at
    I'll be going through your responses and work on suggestions as well as consider providing more information. Thanks for all input!
     
    An update, as I wrote in the task description, is that I noticed that the problem disappears when I change the format's applied model to the one two versions older. After doing that, I can complete the format version.
     
    When I compare the models where the problem starts appearing, it seems like there are very few differences between them, just an added XML-segment and the string underneath it, iirc. I've looked closer at those fields in the format and I'm looking for it in the model mapping. So far I haven't been able to find anything that seems off there.
     
    It seems a bit strange to me that there's an error message about a key missing, and it appears when changing the underlying model.
    - The format doesn't seem to be using the new value in the model, it was probably intended for another format based on the same model.
    - Nothing seems to have been removed from the model, and I don't see why adding underlying data in the model would cause a key to disappear.
    This indicates to me that probably the problem lies in the model mapping.
  • Suggested answer
    CA Neeraj Kumar Profile Picture
    5,135 Super User 2026 Season 1 on at
    Hi Dan,
     

    It’s difficult to pinpoint exactly what happened in your specific case, but based on experience, similar issues often occur when a component of the model has not been updated at the format level.

    Model components in D365FO do not automatically update — you usually need to rebase or manually change the version inside the format configurations.

    This is especially common with standard Microsoft configurations, where multiple models may be required even if the versions appear unrelated. The reason is that many enums also depend on the exact version of the model. When the model version changes, the related enums are not always updated automatically unless you explicitly update them in the model.

    My answer becomes a little tricky 😊.
     
    Regards,
    Neeraj Kumar
  • Dan P Profile Picture
    280 on at
    Thanks for your response, Meraj! Appreciated.
     
    > "Model components in D365FO do not automatically update — you usually need to rebase or manually change the version inside the format configurations."
    Yes, as I described the problem appears when I change between two old models inside the format configuration:
    "I noticed that the problem disappears when I change the format's applied model to the one two versions older"
     
    There are no enum changes between the models, so I don't think that's where the problem lies.
     
    > "based on experience, similar issues often occur when a component of the model has not been updated at the format level."
    Ok, good to know, I'll keep this in mind. Thanks!
  • Dan P Profile Picture
    280 on at
    I seem to have localized what's causing the issue now. Enumerations have a separate model selection in the format, and I wasn't aware. As I tried to change the model connected to a definition but not the model connected to the enumeration, there was a mismatch in the selected models. Or something in that direction.
     
    I've imported the configurations to a local test environment and there the problem doesn't quite appear. Or rather, the model connected to the enumeration is automatically updated with an information message stating this.
     
    However, in the environment where the problem appears, using the same configurations, no automatic update of the model connected to the enumeration appears, and when I try to manually change it, I'm informed that I can't do that because there is a mismatch.
     
    Depending on in which order I change the model of the enumeration and the definition, in the format, and when I save the changes, I get different error messages.
     
    When I set both models to the last accepted format, save, that's ok.
    Then I set the enumeration's model to one step higher and try to save the format config, then I get this message:
    "Changes of the current Format that have been introduced during its editing can't be recorded as variances (delta) between the base Format and the current one."
    If instead I set the definition's model to one step higher and save, that's ok. If I then try to update the enumeration's model to one step higher, I get this error message (same as reported):
    "Value cannot be null. Parameter name: key"
  • Suggested answer
    CA Neeraj Kumar Profile Picture
    5,135 Super User 2026 Season 1 on at
    Hi @Dan P,
     
    Great !!
    I was pointing to this point only that if version of model is different for enumeration, we face this error.
     
    "The reason is that many enums also depend on the exact version of the model. When the model version changes, the related enums are not always updated automatically unless you explicitly update them in the model."
     
    Regards,
    Neeraj Kumar
     
    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
  • Dan P Profile Picture
    280 on at
    That was absolutely very helpful Neeraj and it led me in the right direction, thanks again! It was instrumental in allowing me to locate part of the issue.
     
    To be clear about the solution, it would have helped me identify the exact source of the problem to mention that the enumeration has a separate connection to a model in the format mapping and that it needs to be manually updated (though sometimes automatically updated). From reading your suggestion, I understood what aspect I should be looking into but not exactly how or where, as the format is already connected to a model through the data source which selects a model and a definition -I find it quite counter-intuitive that an enumeration needs to be separately connected to a model, but that is a question of the design of ER formats. I know how difficult it is to explain things in details, so this is a natural aspect of communication, I think.
     
    However, there is still a problem and I suspect it is related to the rebasing of the model mapping.
     
    But yes, probably when I'm done with this, and it's working, I will likely mark your reply as an answer. Thanks again, helped me a lot!
  • CA Neeraj Kumar Profile Picture
    5,135 Super User 2026 Season 1 on at
    Hi @Dan P,
     
    You can share the current issues that you are facing, we will try to give some suggestions if possible. 
     
    Regards,
    Neeraj Kumar

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 660

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 655 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 557

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans