Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
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!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: SLX Group - Last History Only
Rob
Posts: 2
 
SLX Group - Last History OnlyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 May 11 2:17 PM
fiogf49gjkf0d

I wasn't sure which forum to post this in so I hope this it's ok here.


For reference, we're still on 6.26 because it's been running perfectly stable doing everything we need it to do.


I'm in query builder trying to make the conditions pull the last history record for an account. For example if an account has 1,000 notes/phone calls etc, we only want to see the most recent result to find out if a company hasn't been called in a while. I've been searching the internet for hours and this site was on the only place that even came close to helping find what I was looking for.


This thread http://www.slxdeveloper.com/forum.aspx?forumid=5000&;postid=19581 references using the "Select Max(CreateDate) from History" in the history.accountid field, but every variation of it I try yields no results.


Has anyone run into a similar problem in the past or might know how to write some code that will do what we need?


 

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: SLX Group - Last History OnlyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 May 11 2:53 PM
fiogf49gjkf0d

Do you have Remotes?  And/or is this a report that would only be ran by Network users?


If so, you could use an SQL View to get this result.


 


 

[Reply][Quote]
Rob
Posts: 2
 
Re: SLX Group - Last History OnlyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 May 11 3:08 PM
fiogf49gjkf0d

No remotes, all LAN users.


I'm not familar with that app, but it'd be nice to have it in a Group tho since my users are familiar with that UI.

[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: SLX Group - Last History OnlyYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 May 11 3:19 PM
fiogf49gjkf0d

It is not an easy task, but here is how to do it:


- Create a Table with the Desired fields from the Latest History record.


- Using SQL Management Studio, drop the table, and on its place create an SQL View. Here is a Sample Query that you could use to base your View upon:


 


 


 


 


 


 


SELECT  CATEGORY, DESCRIPTION, NOTES, TYPE
FROM HISTORY H INNER  JOIN
(
 SELECT ACCOUNTID, MAX(CREATEDATE) AS CREATEDATE FROM
 HISTORY GROUP BY ACCOUNTID
) HD ON H.ACCOUNTID = HD.ACCOUNTID AND H.CREATEDATE = HD.CREATEDATE


By dropping the Table at the SQL Level and then adding a View with the same name and Schema, then you trick SLX into using the View.


As stated, this is only a good option if you don't have Remotes, otherwise you could still do it, but you would have to find the means to distribute the Views, etc, and it turns into a bit more complex process.

[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 © 2024 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): 11/25/2024 4:33:27 AM