Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 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!
 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: Adding a record from a datagrid right-click
Mark Hanford
Posts: 131
 
Adding a record from a datagrid right-clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Feb 09 11:19 AM
Greetings folks,

I have a datagrid on a form (belonging to a custom main-level table), and I'm trying to get the "Add New" functionality working for people to add records to it.

The table model I'm trying to implement is a new main-level entity that has a many-many relationship with contacts, so I've created a new main view for SERVICE, and a CONTACT_SERVICE table under contacts linked on CONTACTID.

The datagrid is a view of all CONTACTs that link through to a SERVICE vie the CONTACT_SERVICE table. The BindID is set to SERVICE:SERVICEID, and the EditView is set to Service:AddEditService. The default add/edit/delete EditOptions are enabled.

Editing or adding doesn't seem to work, I'm guessing because it's trying to link using the BindID?

I think I'm rambling :D

The question is (I think):

If I have a main view SERVICE, with a datagrid showing CONTACT_SERVICE records linked to this, how do I make the Add/Edit actions pass the correct ID to the Edit form? (The edit form is bound to CONTAST_SERVICE)
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: Adding a record from a datagrid right-clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 2:23 AM
Make sure all the following conditions are met.

  1. You have Data Form (Contact) for main view

  2. You have Data Form (Contact_Service) for edit view

  3. On main view form you have DataGrid with following parameters:

    • BindID = ContactID

    • When you edit SQL property in Query Builder on "Grid Details" tab there Table field is set to Contact_Service and below field is set to Contact_Service.ContactID

    • When you edit SQL property in Query Builder on "Layout" tab there is Contact_ServiceID field

    • Keyfield = Contact_ServiceID


[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Adding a record from a datagrid right-clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 3:25 AM
Quote:
Originally posted by Stainless Steel Snake

Make sure all the following conditions are met.

  1. You have Data Form (Contact) for main view

  2. You have Data Form (Contact_Service) for edit view

  3. On main view form you have DataGrid with following parameters:

    • BindID = ContactID

    • When you edit SQL property in Query Builder on "Grid Details" tab there Table field is set to Contact_Service and below field is set to Contact_Service.ContactID

    • When you edit SQL property in Query Builder on "Layout" tab there is Contact_ServiceID field

    • Keyfield = Contact_ServiceID




Very helpful response dude - I bet that fixes it.

Phil
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Adding a record from a datagrid right-clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 6:43 AM
Aha! I love you!

It was indeed this (although it's service that's the main view, but anyway...)

Main top-section view is bound to SERVICES
The additional grid-tab (for middle/lower section) is bound to SERVICE
My datagrid was bound to CONTACT (because I wanted to see contacts was my thinking), instead of being bound to CONTACT_SERVICES

Changing the datagrid to the link-table fixes it all. Kind of obvious in hindsight
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: Adding a record from a datagrid right-clickYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 Feb 09 9:20 AM
[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): 8/28/2025 4:42:32 AM