All,
I did a few searches to see if I could find an answer to this question, but I find I'm running into a dead end. I have a requirement to create a QBE, or Advanced Lookup form, for a completely custom entity - custom table, custom MainView, etc. I'd prefer not to go the "Quick Find" route if possible, as there are some fields that require more complex search capabilities than databinding will allow.
I've already attempted to use Application.BasicFunctions.CreateTempAdHocGroup and CreateTempGroup, but with very little success. CreateTempAdHocGroup only seems to open the correct mainview, but then only loads the first group created for the mainview, which is a group with no conditions. CreateTempGroup opens the MainView and creates a group called Lookup Results (despite trying to give it a different name), but the group is always empty. If I provide an ID, it'll display that record, but the group count is 0, and the other records that should be found in the query aren't visible. After a little research, it seems these two functions were only built for T/A/C/O. What a letdown if that's really the case.
Here's the code I was using:
strSQL = "(SELECT AT.Advisor_TeamID " & _ "FROM Advisor_Team AT WITH (NOLOCK) " & _ "JOIN Contact C WITH (NOLOCK) ON AT.PrimaryContactID = C.ContactID " & _ "JOIN Address AD WITH (NOLOCK) ON C.AddressID = AD.AddressID " & _ "JOIN C_Contact CC WITH (NOLOCK) ON C.ContactID = CC.ContactID " & _ "JOIN Account A WITH (NOLOCK) ON C.AccountID = A.AccountID " & _ strATM & strCT & strWhere & ")"
Application.BasicFunctions.CreateTempGroup "Advisor_Team", "Lookup Results Test", "Advisor_TeamID", " IN ", strSQL, ""
Has anyone been able to do something similar - without a 3rd party tool - to at least imitate the Advanced Lookup for a custom entity? Any ideas welcome.
System: SalesLogix Version 7.5.1 Windows Client
Thanks! |