Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Unhandled exception. System.InvalidOperationException: Sequence contains no matching element.

Posted on by 452
Hello all,
 
While working on a report with my own data, I'm receiving the following build error:
An unhandled exception was thrown while validating WWIFreeTextInvoice with callstack System.InvalidOperationException: Sequence contains no matching element at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate
I've looked for similar post here in the community, but due to the software change in the community hosting software the links in some other posts are broken.
 
How do I begin to track down the source of this error?
What can I do to eliminate this error?
 
Thanks in advance.
  • jt1024 Profile Picture
    jt1024 452 on at
    Unhandled exception. System.InvalidOperationException: Sequence contains no matching element.
    So this post was a follow on to https://community.dynamics.com/forums/thread/details/?threadid=3bf9af4d-1557-ee11-be6f-00224827e8f9, and in that post I wrapped it up by describing how I side-stepped the problem.  I still don't know what was up with this:
    An unhandled exception was thrown while validating WWIFreeTextInvoice with callstack System.InvalidOperationException: Sequence contains no matching element at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate"
    error.
     
    I think it's basically a SNAFU.
     
    - Jim
  • jt1024 Profile Picture
    jt1024 452 on at
    Unhandled exception. System.InvalidOperationException: Sequence contains no matching element.
    This is the full error list window for this:
     
    If I'm reading this correctly it seems the next things I should investigate are what this line is telling me:
    Microsoft.Dynamics.AX.Metadata.Extensions.Reports.AxReportDataSetParameterExtensions.GetAssociatedReportParameter(AxReportDataSetParameter datasetParameter, AxReport report)
    Which lead to the:
    Error        Path: [AxReport/WWIFreeTextInvoice]:"An unhandled exception was thrown while validating WWIFreeTextInvoice with callstack System.InvalidOperationException: Sequence contains no matching element
       at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
     
    If anyone has any tips or ideas on how to investigate and solve this it would be greatly appreciated.  I feel like I'm blind folded, in the dark, in a barn looking for a needle in a giant haystack.
     
    - Jim
  • Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    Unhandled exception. System.InvalidOperationException: Sequence contains no matching element.
    Hana's answer is completely off-topic. It's about Telerik Sitefinity, not Microsoft Dynamics.
  • Suggested answer
    Hana Xue Profile Picture
    Hana Xue Microsoft Employee on at
    Unhandled exception. System.InvalidOperationException: Sequence contains no matching element.
    Hi,
    I found a problem similar to yours,

    It mentioned that the reason for this issue may be that the page template used on the page is based on missing layout files.
    And a solution was provided, you can try it:
    1. Go to the Pages view and check the template of the problematic page.
    2. Go to Design>Page templates and check based which Layout file the template is based on.
    3. Go to the dedicated folder and ensure that the file is not missing (e.g., ResourcePackages\ Bootstrap\ MVC\ Views \Layouts)
    Best Regards,
    Hana
     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans