Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Bronze Super Contributor
Posts: 152
Registered: ‎02-01-2011

Activity list view Time Frame Filter

Users are receiving errors when trying to filter the Activity list view by Time Frame. Error in event log is "Command was not prepared." The error is coming from the slxdata.ashx page.

 

...&activeFilter=((((Activity.Timeless eq false and Activity.StartDate between @2014-06-19T04:00:00Z@ and @2014-06-20T03:59:59Z@) or (Activity.Timeless eq true and Activity.StartDate between @2014-06-19T00:00:00Z@ and @2014-06-19T23:59:59Z@)))) AND (User.Id eq "U6UJ9A000010") and (Status ne "asDeclned" ) and (Activity.Type ne "atLiterature" )&...

 

it appears that slxdata.ashx (or SData for that matter) is unable to parse this query. Specifically it doesn't seem to like the "Activity.Timeless" and StartDate OR ... part, because if you remove the "or" clause the query works fine.

 

Anyone seen a fix (or open ticket) for this?

 

 

Andy Freeman
TrellisPoint, LLC
ep
Copper Contributor
Posts: 5
Registered: ‎09-01-2014

Re: Activity list view Time Frame Filter

I second this. The query works when you are logged in as Admin but when logged in as a user it does not work. I can confirm this on a fresh install of Saleslogix 8.1 with web core update 03.

 

Further research shows that this error is not with the actual query that retrieves results but rather the one that retrieves metrics. Metrics are totals displayed in the filter time frame selection menu. It's your personal count only for each of the possible filter selections (next month, next week etc...). It is wired directly to the SData query you talked about and runs about 6 queries against the SQL server. Only the first one is submitted so I am guessing there is some type of over-complexity of the query when it tries to only see the activities a normal user has access to.

 

A possible workaround is to add in a httpHandlers in the web.config that would only handle this request and then statically return some canned response that it is looking for. You can probably get a good canned response by running the query as Admin. In my opinion I don't really care to see a metric of each of the filter selections.

 

It’s a shame to have to use that kind of workaround for a problem that existed in 8.1 from the beginning…

Moderator
Posts: 440
Registered: ‎05-07-2008

Re: Activity list view Time Frame Filter

This is a known issue with SQL Server versions prior to SQL 2012.  can you confirm SQL version.

John Perona

Director, Infor CRM Development

Infor CRM

Infor CRM

Bronze Super Contributor
Posts: 152
Registered: ‎02-01-2011

Re: Activity list view Time Frame Filter

Yes, confirmed 2008 R2 servers. Is there a workaround for these?

Andy Freeman
TrellisPoint, LLC
Highlighted
ep
Copper Contributor
Posts: 5
Registered: ‎09-01-2014

Re: Activity list view Time Frame Filter

Here is the workaround we use. We create a new portal called “Canned Responses”. It's more of a "hack" than a workaround as it rewrites any request to the activity list view filters (this expects a JSON response from the slxdata.ashx page). The result is a canned JSON response that will always display (0 / 0) for all the filter category’s. So far this is the only dynamic filter I have found that throws errors when used on SQL 2008.

 

Note: you must have URL Rewrite Module 2.0 installed on your IIS server.

http://www.iis.net/downloads/microsoft/url-rewrite

 

https://drive.google.com/file/d/0B-9TLDjZD5BJOXdTZ3hsVnBRUDA/edit?usp=sharing

Remember to add the Canned Responses portal to your default portal deployment.
This adds 3 lines of code to your web.config of SlxClient...