Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • timmywiff 2 posts 22 karma points
    Apr 22, 2020 @ 16:38
    timmywiff
    0

    RecordReaderService.GetRecordsFromForm NullReferenceException

    Umbraco Forms 8.3.1

    Umbraco Core 8.4

    What would cause GetRecordsFromForm() to throw a NullReferenceException? Entries do exist in the database.

    I'm using

    var recordReaderService = Current.Factory.GetInstance<IRecordReaderService>(); IEnumerable<IRecord> records = recordReaderService.GetRecordsFromForm(new Guid("391d05d6-d972-4e18-8e5e-6295e606c2cd"), 1, int.MaxValue).Items;

    The code has worked fine previously so I don't know what is causing it. I have tried it on different forms and still get the same error.

  • Paul 4 posts 93 karma points
    Apr 28, 2023 @ 15:13
    Paul
    0

    Have you injected IRecordReaderService into your constructor?

Please Sign in or register to post replies

Write your reply to:

Draft