I had a weird error after updating a record where the parent browse would not properly refresh. I tried everything, until I finally traced it down to a view error in the browse SetView. My work around (see code below) was to add a manual next as soon as the view was opened. If I got an error 78 (which was because of an unknown problem), I closed the view, then reopened it with the same settings as per the template code just before that embed point. If there was no error, I issued a Previous(View) to restore the correct starting point for the display.
! Start of "After SetView"
! [Priority 5000]
Next(ThisView)
CASE ErrorCode()
OF 78 ! Invalid number of parameters error appears for unknown reason
IF p_web.GetSessionLevel() = 1 and FileErrorCode()
stop('fileerror='&Clip(FileError())&' fileerrorcode='&fileerrorcode())
END
Close(ThisView)
Good luck,
Mark
Open(ThisView)
ThisView{prop:Filter} = loc:FilterWas
p_web.SetView(ThisView,InvoiceCustomerSQL,INC:KeyInvoiceCustomerID,loc:PageRows,'BrowseInvoice',left(Loc:LocateOnFields),left(Loc:LocateField),loc:FileLoading,loc:LocatorType,clip(loc:LocatorValue),Loc:SortDirection,loc:ViewOptions,Loc:FillBack,Loc:Direction,loc:NextDisabled,loc:PreviousDisabled,Loc:LocatorCase,loc:RandomBrowseId)
ELSE
Previous(ThisView)
END