8/24/2025 6:38:02 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Generation of dynamic Account Groups via VBA
Posted: 16 Jun 08 9:03 AM
|
Does anyone know of a simple method to create "dynamic" (not Ad-Hoc) groups in VBA without presenting the Group Query Dialog to the user. I'm thinking of a very simple dialog which would just allow the user to select a LeadSource value from a combo-box list and then create the group. But I only see VBA Basic Function methods to create Ad-Hoc or static groups.
|
|
|
|
Re: Generation of dynamic Account Groups via VBA
Posted: 17 Jun 08 8:00 AM
|
I'm sure groups are stored as plugins but I'm not too sure where the data for them is stored. I have a suspicion that you cant create "dynamic" groups via script.
But you never know, there are plenty of people cleverer than me on here so it might just be possible!! |
|
|
|
Re: Generation of dynamic Account Groups via VBA
Posted: 17 Jun 08 9:05 AM
|
For Grid display on same page myDataGrid.SQL = "Select mySQL" myDataGrid.Refresh
************************************************** Create groups through the application.basicfunction (this is just an example snippet - you would need to reform for your purposes)
Application.BasicFunctions.CreateTempAdHocGroup "CONTACT", "ContactTemp", strIDList, strCurrentID Application.BasicFunctions.SetCurrentClientGroup "ContactTemp" Application.BasicFunctions.GlobalInfoSet "TempContactGroup", strIDlist Application.MainViews.ActiveView.ShowIDsAsLookupResult strIDList, strCurrentID
c |
|
|
|
Re: Generation of dynamic Account Groups via VBA
Posted: 17 Jun 08 12:15 PM
|
It's not "simple," but Electrician 1.6 (and higher, http://www.jh3.com/software/electrician.htm) has a feature that lets you output a BLOB field from the PLUGIN table in the form of the VB code required to reproduce it. It doesn't always work flawlessly on all plugin types, but in this particular case it should work well enough...
1. First, create a group to use as a "template" 2. In Electrician, go to Tools|Electrician Options 3. At the bottom of the Look'n'Feel tab, in the "Binary Decoders" combo, select "BASIC" 4. Under "Plugins" on the (Electrician) NavBar, open a query for groups and find the one you just created 5. Right-click and choose "View as Binary" (F8) 6. Copy the results into a VBScript plugin
The results will usually require some tweaking, and you'll obviously have to substitute the LEADSOURCEID value in the group's conditions with a variable, as well as the QueryName property (which should match what's in the PLUGIN.NAME field). Don't forget that all length-specifier characters (preceding each string) must be accurate, or a Stream-Read error will result... But it *can* be done, and you only have to make it work once, right? |
|
|
|
Re: Generation of dynamic Account Groups via VBA
Posted: 18 Jun 08 1:40 PM
|
'Sorry I didn't reply until now, but I've been at another client site.
The VBA code shown above will only create a temporary group rather than a full dynamic group, and that's also the trouble with the Lookup Function options shown when a user invokes those searches (Account Type, etc.).
John Hedges's method above is very close and I'll look at Electrian. What I've been trying to do thus far has been to create a template Group for copy and save purposes where I can use VBA to simply change the LeadSource description parameter prior to saving it. This will be an on-going effort as I've got a large 5.1 to 7.2.2 conversion to run later this week. So, more later next week.
|
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|