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
Also, if you wanted to find just the selected ID’s on this view you can use:
For intIndex = 0 To .Selection.Count – 1