11/27/2024 4:23:44 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.
|
|
|
|
creating groups programmatically
Posted: 30 Jan 07 3:18 PM
|
fiogf49gjkf0d I'd like to know how to create permanent groups in architect code. I know it's possible to create temporary groups using functions like CreateTempGroup (although the developers' reference wasn't extremely clear on how that worked). But I need one that actually becomes a plugin, such that users can then access/share/edit it like usual. I could probably hack something with the plugins table, but I'm pretty sure there's a way to do it provided by Saleslogix. Could anybody get me up to speed on that? |
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 1:59 AM
|
fiogf49gjkf0d Hi Trevor, there isn't a function to do that - we've been "crying" out for one for years but, alas, no joy yet. |
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 8:56 AM
|
fiogf49gjkf0d I've used this method in the past. Not great, but it does work, this is for creating contact groups. First parameter is the group name, second is list of id's. You could change the parameters for CreateTempGroup to do more that use an ID list, but this was a quick example. Same applies for adhoc groups.
Sub MakeContactDynamicGroup(strGroupName, strIDList)
Application.BasicFunctions.CreateTempGroup "Contact", strGroupName, "ContactID", " in ", "(" & strIDList & ")", "" Application.BasicFunctions.SetCurrentClientGroup "Contact:" & strGroupName Application.BasicFunctions.DoInvoke "Function", "Lookup:SaveAsGroup"
End Sub 'MakeContactDynamicGroup |
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 1:35 PM
|
fiogf49gjkf0d Hmm, that almost works for me, but not quite. I really need to include multiple conditions.
Can anyone point me toward information on the TSLQuery object? That's the data blob that gets stored for a group plugin. |
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 1:37 PM
|
fiogf49gjkf0d you can always use the "IN" operator and put a nested query in the Condition. Application.BasicFunctions.CreateTempGroup "Contact", strGroupName, "ContactID", " in ", "(Select ContactID from Contact where lastname like 'smith' and firstname like 'john')", ""
|
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 1:40 PM
|
fiogf49gjkf0d Good idea, and I'll probably go ahead with that for now. I'd still like to know about the TSLQuery object, though, for future reference. |
|
|
|
Re: creating groups programmatically
Posted: 31 Jan 07 2:22 PM
|
fiogf49gjkf0d The TSLQuery object found in the Legacy toolbox? Pretend it doesn't exist? Just kidding. I've seen it used once upon a time back in v4.x and I quickly did away with it. There's never been much documentation on the control and I generally take that as a sign not to use it.
Then again I could be totally off base and this is a VBScript control. |
|
|
|
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!
|
|
|
|
|
|
|
|