Question: I’m trying to get the SQL that is creating the Lookup Results group for a
mainview in SalesLogix. If it were an actual group I know I could use
the Application.BasicFunctions.GetGroupSQL, but I’m not seeing an ID for the Generic Lookup Results group.
Answer: This should do what you need:
sql = Application.MainViews.ActiveView.CurrentGroupSQL
msgbox sql
Also, if you wanted to find just the selected ID’s on this view you can use:
with application.MainViews.
For intIndex = 0 To .Selection.Count – 1
msgbox .Selection.Item(intIndex)
Next
end with



