fiogf49gjkf0d Hi all,
We have a client using SLX 7.5.2, and they recently contacted us regarding what they saw as a bug within SLX; opening an Opportunity record from the Accounts:Opportunities tab will sometimes open a record within a group containing all other Opportunities for the Account, and sometimes not.
Drilling down a little, we have found this Sub within SLX Common:
'Iterates the the grids recordset object to build a list of ID's, then creates a new group based on the list, then displays the current record
'objGrid - Grid object 'strKeyField - Name of the primary KeyField for the grid 'strPlugin - Name of the MainView plugin to be opened 'intMode - Window style the MainView will be opened with 'blnExisting - Specifies whether to open a new instance of the MainView or open an existing instance if exists Sub OpenMainViewFromGridCrntID(objGrid, strKeyField, strPlugin, intMode, blnExisting) const MaxCount = 250 'ShowIDsAsLookupResult API call may fail for counts larger than this. The call creates an in clause with all of the 'requested ID's and at some point will be to large for the underlying db provider to handle Dim strIDList, strCrntID Dim objMainView Dim i If objGrid.RecordSet.RecordCount > 0 Then strCrntID = objGrid.GetCurrentField(strKeyField) If intMode = 2 Then Set objMainView = Application.MainViews For i = 0 To objMainView.Count - 1 If objMainView.Item(i).CurrentID = strCrntID Then objMainView.Item(i).BringToFront Exit Sub End If Next Set objMainView = Application.MainViews.AddEx(strPlugin, intMode, blnExisting, 1, strCrntID, "") 'DNL objMainView.CaptionBarVisible = False objMainView.Show Else If strCrntID <> "" Then If objGrid.Recordset.RecordCount > MaxCount Then strIDList = "('" & strCrntID & "')" 'DNL defect 1-47570 Else strIDList = RemoveParenthesisFromStr(GetListFromGridByField(objGrid.Recordset, strKeyField)) End If 'We're passing an invalid RecordID so to avoid multiple refreshes to the mainview. Application.MainViews.AddEx strPlugin, intMode, blnExisting, 1, "Invalid", "" 'DNL Application.MainViews.ActiveView.ShowIDsAsLookupResult strIDList, strCrntID 'DNL End If End If End If End Sub
The const maxCount is what I find interesting, as it seems to be in there solely to satisfy Oracle constraints when creating IN clauses; the DB provider our client uses is MSSQL 2005. Increasing this value does indeed resolve their issues, but I wanted to know what everyone else's view on this is? |