Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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...Goto account based on selected row in datagrid
Brian Kempe
Posts: 53
 
How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 5:07 PM
fiogf49gjkf0d
When I doubleclick on a row in a datagrid in the tabspane I would like the detailsview to change to the associated account.

I tried: set application.BasicFunctions.CurrentAccountID=DataGrid1.Selection

And: set application.BasicFunctions.GetCurrentAccountID= DataGrid1.Selection

And: set frmAccountDetail.BindID= DataGrid1.Keyfield

None worked ... Mainview is called "Account Details"... the DetailsView is a form named frmAccount_Detail from a plugin called "Account Detail"... My manageform in the tabspane is called Sales_Order_Lines in a plugin called "ProSoft Order Lines"

Any Suggestions
Thanks
P.S. If it can be done with and without switching the active window that would be great

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 5:29 PM
fiogf49gjkf0d
First of all, DataGrid.Selection is a collection, not a property. Using it the way you are won't get you what you're after. Also, KEYFIELD represents the field name, not the value. To get a value from the grid you can use either a value from the selection collection, or use GetCurrentField.

There are a few different ways to do what you're after. The cleanest way IMO is to use the ShowDetails method:

Application.BasicFunctions.ShowDetails "account", datagrid1.GetCurrentField("accountid")


Make sense?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 5:35 PM
fiogf49gjkf0d
Also, from your attempts, this one would have worked (assuming you were grabbing a specific ID value from the selection collection or using GetCurrentField - and dropped the "=")

Application.BasicFunctions.CurrentAccountID datagrid1.GetCurrentField("accountid")


CurrentAccountID is a function which takes a single parameter, not a property (although it should be). However, with 6.2 the "Current" functions, such as CurrentAccountID have less meaning due to the introduction of MainViews. So use something like ShowDetails instead.

[Reply][Quote]
Brian Kempe
Posts: 53
 
Re: How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 5:49 PM
fiogf49gjkf0d
Thanks Ryan,
I'll try them both right now
[Reply][Quote]
Brian Kempe
Posts: 53
 
Re: How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 7:37 PM
fiogf49gjkf0d
I couldn't get this one to work
[Reply][Quote]
Brian Kempe
Posts: 53
 
Re: How to...Goto account based on selected row in datagrid Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 7:38 PM
fiogf49gjkf0d
This one did the trick
Application.BasicFunctions.ShowDetails "account", datagrid1.GetCurrentField("accountid")
Thanks
[Reply][Quote]
Brian Kempe
Posts: 53
 
Re:Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 8:04 PM
fiogf49gjkf0d
moved to new string
[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/26/2024 12:40:11 PM