Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: How to get a reference to the record selected in a list view of a group
Ram Sundaresan
Posts: 16
 
How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 09 8:51 AM
Is there a way of getting reference to the record selected in a list view of a group? For example if I create a contact group of all contacts with a response to a campaign (joining the targetresponse table) and select one record, will I be able to get the targetresponseid so that I can highlight that particular targetresponse record in a tab. In other words is there a way of storing globally the .GetCurrentField("A3_TARGETRESPONSEID") of a contact group?

Thanks.
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 09 9:21 AM
Use following code:
For i = 0 To Application.MainViews.ActiveView.GroupsPane.Selection.Count - 1
    strTargetResponseID = Application.MainViews.ActiveView.GroupsPane.Selection.Item(i)
    ...
Next
[Reply][Quote]
Ram Sundaresan
Posts: 16
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 09 11:48 AM
Thank you. Application.MainViews.ActiveView.GroupsPane.Selection.Item(i) gives me the Contactid since, I guess, this is a group under Contact. I wonder if it will give me the targetresponseid if that is the first column. I will try that.
[Reply][Quote]
Michael Seeger
Posts: 14
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Aug 09 4:03 AM
Hi,

this code was very useful to me !!! Thanks a lot !!!

@ Ram Sundaresan: I found out that the .Item(i) returns the primarykey value of the selected record. Even if it is a customized non-SLX-table.

Btw: Created a function based on the code above to retrieve those ids and it works brilliant !

M.
[Reply][Quote]
Guy Barrett
Posts: 63
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Feb 10 7:34 AM
Apologies for bumping this, but I have a further question and hopefully one of you guys might be able to shed some light on it.

If application.MainViews.ActiveView.GroupsPane.Selection.item(i) (where i is one of the selected items) returns the primary key of the group. Is there a way of getting the values of any of the other columns in the group layout by fieldname?

For example, if the group is a contact group containing all campaign responses between two dates, and one of the columns is a TARGETRESPONSEID (as such, the same contact may be in the group multiple times) - is there any way of retrieving that TARGETRESPONSEID from the Selection.Item(i)?

Eg. application.MainViews.ActiveView.GroupsPane.Selection.item(i).Value("TARGETRESPONSEID")

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Feb 10 6:30 AM
No, as you'd have no gurantee that it exists - hence, you get just the primary id. However, once you have that - you can get anything you like with another query (GetField or GetFields for example).
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 10 10:35 AM
Quote:
Originally posted by Stainless Steel Snake

Use following code:
For i = 0 To Application.MainViews.ActiveView.GroupsPane.Selection.Count - 1
    strTargetResponseID = Application.MainViews.ActiveView.GroupsPane.Selection.Item(i)
    ...
Next


Is there a faster way to do this? on a 4,000 row selection this is just dog slow?
[Reply][Quote]
Nick
Posts: 4
 
Re: How to get a reference to the record selected in a list view of a group Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Sep 15 6:41 PM

Hi,


 


Dou have web version ont this one?

[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/22/2024 10:00:28 AM