Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Group API
Nicolas Galler
Posts: 93
 
Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 08 10:05 AM
Anyone has some documentation on how to manipulate groups (save adhoc group, get group's entities, etc)? I have spent a few hours so far of reverse engineering with reflector but it's not much fun.

Thanks
Nick
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 08 12:18 PM
Hi Nick,

I've not had the time to (yet) but can't wait to read about your findings

-Ryan
[Reply][Quote]
Nicolas Galler
Posts: 93
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 08 2:30 PM
Well, it turned out to be not much fun at all, but I found out enough to get me going. I wrote it down at http://blog.chivinou.net/2008/03/19/accessing-saleslogix-groups-programmatically-part-1/ The API is full of traps right now but hopefully it will be getting a much needed overall with the next version.

Hope this helps!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 08 2:33 PM
Hehe. Thanks Nick. I figured we'd see some great write up from you on it at some point

The post looks great.

-Ryan
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Mar 08 7:45 PM
Unfortunately.. the Group stuff has deep roots back into the Windows side.. and for now (and I'd guess for all of 7.x) it has to be that way for compatability.
--
RJLedger - rjlSystems
[Reply][Quote]
Brian Mooy
Posts: 25
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jun 08 5:19 PM
Nick and I have found a way to create a group in Saleslogix Web 7.2.2.


String groupXml = GroupInfo.GetBlankGroupXML("Contact");
GroupInfo gInfo = new GroupInfo();
gInfo.GroupXML = groupXml;
gInfo.GroupName = "My Group Name";
gInfo.AddLookupCondition("CONTACT:CONTACTID", " IN ", "(" + sqlStr + ")");
gInfo.Save();


Where sqlStr is the list of conditions you want to filter by, natch.

This works ok. But there's one problem. Under certain circumstances, such as not having visited a group within saleslogix before calling this code, or working disconnected, GroupContext.GetGroupContext().CurrentGroupInfo is null. Unfortunately, this damn thing is needed for the Save to work 100%. The group is saved, but gInfo.GroupID is null, in the example above.

So if you create a group, and then want to redirect to it by say, calling

Response.Redirect(string.Format("Contact.aspx?gid={0}", gInfo.GroupID));

it doesn't work, because gInfo.GroupID equals "Object Reference Not Set to an Instance of an Object"

I tried this, as a cheat:

//Validate correct creation of group.
string groupID = null;
GroupContext gContext = GroupContext.GetGroupContext();
EntityGroupInfo entityGInfo = gContext.GetGroupInfoForTable("Contact");

//Find Group
foreach (GroupInfo tempInfo in entityGInfo.GroupsList)
{
if (tempInfo.GroupName == gInfo.GroupName)
{
groupID = tempInfo.GroupID;
break;
}
}

if (groupID == null) return; //Group Name not found; Break out and leave.

Response.Redirect(string.Format("Contact.aspx?gid={0}", groupID));

Which is excessive, and it returns a GroupID (Yay!) but it STILL fails to re-direct to the contact.aspx page with that group id.

Again, if I call either version of this functionality AFTER visiting the contacts or accounts page, there is zero problem. But if I do it BEFORE visiting those pages (IE: Call it right off the toolbar from the welcome page) it gives an error.

Good times.
[Reply][Quote]
NixDev
Posts: 98
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 09 3:29 PM
I'm needing to implement some custom filtering functionality to the currently selected group. Please see http://www.slxdeveloper.com/forum.aspx?forumid=4002&postid=23096

I wonder if any of this could be of any use for solving this problem? I'm really puzzled, maybe the senior SLX developers here could give me a hint.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 09 7:30 AM
What do you mean by Custom Filtering?
Are you looking into creating your own groups on the fly?

Or are you looking to create a Filter as in the 7.5 Tasklets?
[Reply][Quote]
NixDev
Posts: 98
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 09 12:42 PM
I don't know if you could read my other post. I don't want to create a new group on the fly; I need to filter the *current* group, but, and here's the problem, i need to filter based on much more complex criteria than out of the box functionality. For instance, SLX 7.51 only allows filters based on tables that have 1-1 relationships to the base entities. Ok, what if I want to do something like this:

"given the current group of accounts, i need to filter it so that i can only see accounts that had sales last year"
or
"given the current group of accounts, i need to filter it so that i can only see accounts that had activities this month"

With the built in filtering capability of saleslogix, there's no way to do something like this. This is what i need to achieve.-

Thanks.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 09 2:46 PM
Those type of conditions can indeed be applied to Groups, but not sure what your needs are.
Another alternative is to build SQL Views that Expose that data as 1 to 1 fields against the base Entities.

[Reply][Quote]
NixDev
Posts: 98
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 09 4:56 PM
Hi Raul, thanks replying.

I DO NOT want to create new groups. I want to FILTER THE CURRENT group given new custom filter options in the filters tasklet. I know similar advanced queries can be done when creating new groups, but unfortunately it's not an option for me to tell the user to create a new group, nor do I have to create a new group on the fly.

I need to give the user some extra custom filtering options so that the current group gets sliced and diced by those filters, just like with the OOB filters, but with much more complex conditions. Ideally i'd like to just do something like:

select accounts that meet the criteria of the current group and criteria of the OOB filters and criteria of the new totally complex impossible to do in architect filters.

Given the complexity of my db schema, creating SQL views that expose that data as 1-1 tables is totally out of the question. Plainly impossible. Bear in mind that i'm really simplifying my problem here for the sake of clarity.

So, my problem remains: what's the most sensible approach to give extra filtering possibilities for the current group?

totally puzzled,
Nix.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 09 6:10 PM
I would still think that you ought to start with building your Complex filtering into Views. Otherwise, you would be having to create those complex filters into the Filter, probably a more daunting task.

So, this is how I would tackle this task for the 2 conditions that you had previously mentioned:
a) Create a new SQL View that defines several my Filter points. The view will then display:
ACCOUNTID, SALES_LAST_YEAR and ACTIVITIES_LAST_MONTH.

Make it so that the fields returned strings with only the following possible values: Yes and No [Avoid Blanks and NULLs, unless your logic calls for something such as N/A (Not Applicable)]

b) Create an Extension entity for the View created on the previous step

c) Add a Filter of Type Range (add 2 entries for the possible values: Yes and No) and set the Display Name to "Sales Last Year"

d) I Add a Filter of Type Range (add 2 entries for the possible values: Yes and No) and set the Display Name to "Activities Last Month"

Full Build, Compile, Deploy and Test.

The end result is that you would have 2 new Filter Categories on the Task List, one for each field defined.
From there, when the user expands each option, it will displays 2 options to select (under each one): Yes and No.

BTW: Adding these filters is done within the Entity. Expand your Account Entity, right click on the Filters folder and Add the filters.
Also, it may be possible to use C# Properties to calculate the values defined on the View, but I think that it may be better overall to offload those calculations to SQL.
[Reply][Quote]
NixDev
Posts: 98
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 09 10:05 AM
Thanks for keeping with me Raul. Inded this is daunting, as the whole filtering is a black box, and you don't have many options aside from what AA allows out of the box.

What you suggest would work fine for simple possibilities like "did the account have sales last year?". My problem is more complex than that.The user may ask for accounts within the current group that last year had sales greater than 1000 and less than 10000, for products a, b, and c, and that are related to regions abc and def. As you can see, the possible combinations are endless, and there's no way i could just "precalculate" those and somehow make them fit in a 1-1 table for easy filtering. So i really need to get into custom, complex filtering, ideally injecting new conditions. This is why i need something like:

give me accounts
from current group
that match the standard tasklet filters
and that are in
(
accounts that match the new uber complex filters
)

Could this somehow be done???

Thanks, and i really appreciate all the time you've taken to answer my posts!
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Group APIYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 09 11:47 AM
I don't believe that you could easily build on top of the Filter a dynamic framework where the data points are not known. If you do so, that would mean that somehow you have to dynamically associate with each record a value. In other words, if you are saying that the user would want to dynamically filter out for "Had Sales Last Quarter greater than $500,000), you would first have to add to each one of those accounts that data point (Last Quater Sales) and then filter it based on the value.

The limitation is that you would have to dynamically generate and associate that data point, which you are saying isn't known before hand, and I say that is a formula for failure.

You have to define the scope of the filters:
- Identify your Data points
- Identify your Filter Types (Range, Distinct, etc)
- If using Ranges, Identify the Filter Levels

Once you have defined your scope, you could build your Data Points into SQL Views, the Views into Entities (Extensions if appropriate) and then add the Filters into SLX.

[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 4:01:58 PM