I customized a SharePoint list form. In the OnSave event, I did a custom validation before submitting the form i.e.:
Title = ComboBox2.Selected.ProviderName & " - " & DataCardValue3.Selected.CourseUnit
And ReviewYear = Year(DataCardValue7.SelectedDate)
Notify("Course review for this school and course unit already exists for that year.", NotificationType.Error),
It works nicely, but only when I do a page refresh between items.
The issue is, after submitting Item 1, if I try to add another Item that is a duplicate, it does not detect the duplicate and it lets me save it. However, if I try to add the same item a second time, it correctly throws error.
The same issue happens if I deleted the item. If I try to add the same item back, it throws error. However if I click 'Save' the second time it lets me save it.
Looks to me the list data is not refreshed after submission or deletion? I tried doing Refresh(datasource) after SubmitForm, in the OnNew event but it doesn't seem to fix it.