Copied to clipboard

Flag this post as spam?

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


  • Paul 4 posts 93 karma points
    May 26, 2023 @ 08:23
    Paul
    0

    IRecordReaderService returns deleted form entry

    It seem that if I delete a form entry through Umbraco and then use IRecordReaderService to retrieve records, the deleted record is returned until I rebuild UmbracoFormsRecordsIndex. Am I doing something wrong?

    This is the routine I am using..

    private bool DoesRecordExist(string jobId)
    {
        PagedResult<IRecord> AllRecords = _recordReaderService.GetRecordsFromForm(
                        _config.GetValue<Guid>("FormId"), 1, 10);
    
                    var status = AllRecords
                        .Items
                        .Where(t => t.ValueAsString("jobid") == jobId)
                        .Any();
    
                    if (status) {
                        return true;
                    }
    
                    return false;
                }
    
  • Paul 4 posts 93 karma points
    May 26, 2023 @ 13:47
    Paul
    100

    I figured it out - I had to set "DisableRecordIndexing": true within the Forms/Options in appsettings.json

Please Sign in or register to post replies

Write your reply to:

Draft