8/18/2025 4:28:39 PM
|
|
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!
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.
|
|
|
|
Datagrid Adding Multiple Records
Posted: 04 Feb 08 1:29 PM
|
This is my first time playing around with Datagrids, so please be gentle.
I have added a datagrid to an account level tab, and set the BIND ID as accountid. I created a new form, and set the form as the EditView. I also set the SQL on the datagrid to give me all records from a new table with the same accountid as the current account.
Now, what I don't understand is how to bind the fields on the EditView form to the record. I tried to script it all manually to add to the datagrid, which I have done successfully, but when the EditView form closes, another extra row is added. Can I 'turn off' that binding, and just let my script do the work? Or, if not, how do I go about binding fields on the form to the proper fields in the database?
Also, the records have a one-to-many relationship with the account, if that matter.
Thanks! |
|
|
|
Re: Datagrid Adding Multiple Records
Posted: 04 Feb 08 2:14 PM
|
Hi Ben & Welcome - we're all gentle here 
All you need to do is open your data grid and open the SQL property - this will show you the columns etc. On the first (maybe 2nd) tab there is a link box. Just drag your AccountID from the new table (should be in the list above) onto here and it will then automatically do everything else. However, remember it's the AccountID from *your* table - not the AccountID from Account that you need. |
|
|
|
Re: Datagrid Adding Multiple Records
Posted: 04 Feb 08 3:17 PM
|
Hi Ben,
You don't need to manually script the inserting of your data on the edit view. That's the beauty of data binding. Are the fields on the edit view bound to the table? If so, all you need to do is add a "Close" or "OK" button on the form that sets a modal result of mrOK and the bound fields will be saved.
Does that make sense? |
|
|
|
Hey guys, thanks for the responses!
Posted: 04 Feb 08 3:22 PM
|
Ryan, it totally makes sense. Thanks! But, no, they are not bound at this point. For some reason, it won't list the new table as an option when trying to bind them. I thought it was because I hadn't recreated the join, but once I did, it still didn't list it. Any ideas why the new table isn't showing up when trying to bind the field?
Thanks!
|
|
|
|
Re: Hey guys, thanks for the responses!
Posted: 04 Feb 08 3:25 PM
|
You'll want to make sure that the form type you selected for the new form is a data form, not an account or manage form. When you choose data form, you'll be able to select your new table as the base table for the form. |
|
|
| |
|
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!
|
|
|
|
|
|
|
|