Joseph Mullins
30-Mar-2022, 08:10 AM
Since updating to DF 20.1 we are getting this weird error that keeps randomly coming up when on production but unable to reproduce it locally. An cWebSuggestionForm prompts with a Server Action Security Check Error. This then requires a few hard refreshes of the page and then clears. This has only happened since DF 20.1 upgrade. The error is triggered as soon as you start typing, after a few refreshes, works as expected.
I can't get it happening on a smaller code sample so have to go with what's being used. Nothing else is setting the elements properties or bound to it.
15315
The code is:
Object oWebSuggestionForm4 is a cWebSuggestionForm
Set piColumnSpan to 6
Set psLabel to "Employee"
Set piStartAtChar to 1
Set peSuggestionMode to smCustom
Set pbCaseSensitive to False
Procedure OnFindSuggestions String sSearch tSuggestion[] ByRef aSuggestions
Integer iCount
Get SQLEscapedStr of oEmployee_DD sSearch to sSearch
Send Clear to oEmployee_DD
Set pbUseDDSQLFilters of oEmployee_DD to True
Set psSQLFilter of oEmployee_DD to (SFormat("lower(name) like lower('%%%1%')", sSearch))
Send Rebuild_Constraints of oEmployee_DD
Send Find of oEmployee_DD GT 3
While (Found)
Move (SerializeRowID(CurrentRowId(oEmployee_DD))) to aSuggestions[iCount].sRowId
Get Field_Current_Value of oEmployee_DD Field Employee.Name to aSuggestions[iCount].aValues[0]
Increment iCount
Send Find of oEmployee_DD GT 3
Loop
End_Procedure
Procedure OnSelectSuggestion String sSearch tSuggestion Suggestion
String sName
Send FindByRowId of oEmployee_DD Employee.File_Number (DeserializeRowID(Suggestion.sRowId))
Set Constrain_File of oTimesheet_DD to Employee.File_Number
Get Field_Current_Value of oEmployee_DD Field Employee.Name to sName
WebSet psValue to sName
Send Rebuild_Constraints of oTimesheet_DD
Send FindFromTop of oList
End_Procedure
Procedure OnLoad
Integer iRights
Get piUserRights of ghoWebSessionManager to iRights
Set pbRender to (iRights = 999)
End_Procedure
End_Object
I can't get it happening on a smaller code sample so have to go with what's being used. Nothing else is setting the elements properties or bound to it.
15315
The code is:
Object oWebSuggestionForm4 is a cWebSuggestionForm
Set piColumnSpan to 6
Set psLabel to "Employee"
Set piStartAtChar to 1
Set peSuggestionMode to smCustom
Set pbCaseSensitive to False
Procedure OnFindSuggestions String sSearch tSuggestion[] ByRef aSuggestions
Integer iCount
Get SQLEscapedStr of oEmployee_DD sSearch to sSearch
Send Clear to oEmployee_DD
Set pbUseDDSQLFilters of oEmployee_DD to True
Set psSQLFilter of oEmployee_DD to (SFormat("lower(name) like lower('%%%1%')", sSearch))
Send Rebuild_Constraints of oEmployee_DD
Send Find of oEmployee_DD GT 3
While (Found)
Move (SerializeRowID(CurrentRowId(oEmployee_DD))) to aSuggestions[iCount].sRowId
Get Field_Current_Value of oEmployee_DD Field Employee.Name to aSuggestions[iCount].aValues[0]
Increment iCount
Send Find of oEmployee_DD GT 3
Loop
End_Procedure
Procedure OnSelectSuggestion String sSearch tSuggestion Suggestion
String sName
Send FindByRowId of oEmployee_DD Employee.File_Number (DeserializeRowID(Suggestion.sRowId))
Set Constrain_File of oTimesheet_DD to Employee.File_Number
Get Field_Current_Value of oEmployee_DD Field Employee.Name to sName
WebSet psValue to sName
Send Rebuild_Constraints of oTimesheet_DD
Send FindFromTop of oList
End_Procedure
Procedure OnLoad
Integer iRights
Get piUserRights of ghoWebSessionManager to iRights
Set pbRender to (iRights = 999)
End_Procedure
End_Object