UmbracoFormsRecordsIndex not updating index automatically when submissions are posted.
This is for Umbraco 13.5.2 with Umbraco forms 13.2.3
My client has a "apply for membership" form that's an Umbraco forms with a custom workflow that creates an unapproved member and sends an email to one of the editors so they can approve that member.
The problem is that the examine index doesn't seem to update automatically whenever a new post is submitted and since we fetch via IRecordReaderService GetRecordsFromForm (that fetches records from index) the approve page (like the link above) will be blank since the recordid isn't in the index.
Is this a bug perhaps? Right now we need to manually re-index UmbracoFormsRecordsIndex every now and then since our client hans't got admin rights and it's not ideal.
The Examine index should update automatically whenever a new post is submitted (not really sure about forms but on other actions it does). I am not sure if its alright to index each time as a post is made as well, but you can implement a custom handler for form submissions to re-index only the UmbracoFormsRecordsIndex. To achieve this, subscribe to the RecordSubmittedNotification event, which will allow for targeted re-indexing.
You can use IIndexRebuilder.RebuildIndex("UmbracoFormsRecordsIndex") to update the index immediately upon form submission, ensuring the index stays current without the overhead of manually rebuilding every time a new post is added.
UmbracoFormsRecordsIndex not updating index automatically when submissions are posted.
This is for Umbraco 13.5.2 with Umbraco forms 13.2.3
My client has a "apply for membership" form that's an Umbraco forms with a custom workflow that creates an unapproved member and sends an email to one of the editors so they can approve that member.
That email contains a link with formId and recordId, kind of like so: https://www.site.com/approve-member/?formId=1d636c73-4518-4ad8-83ef-9c1e6833ab80&recordId=8037e72d-e4fc-46c3-b4bd-bf4c205e7580 and we fetch all the data and show it to the editor.
The problem is that the examine index doesn't seem to update automatically whenever a new post is submitted and since we fetch via IRecordReaderService GetRecordsFromForm (that fetches records from index) the approve page (like the link above) will be blank since the recordid isn't in the index.
Is this a bug perhaps? Right now we need to manually re-index UmbracoFormsRecordsIndex every now and then since our client hans't got admin rights and it's not ideal.
Hi Alexander,
The Examine index should update automatically whenever a new post is submitted (not really sure about forms but on other actions it does). I am not sure if its alright to index each time as a post is made as well, but you can implement a custom handler for form submissions to re-index only the UmbracoFormsRecordsIndex. To achieve this, subscribe to the RecordSubmittedNotification event, which will allow for targeted re-indexing.
You can use IIndexRebuilder.RebuildIndex("UmbracoFormsRecordsIndex") to update the index immediately upon form submission, ensuring the index stays current without the overhead of manually rebuilding every time a new post is added.
Hi Afreed
Thank you! I'll check it out.
is working on a reply...