04-15-2009 10:42 AM
We created a custom table via the Architect (C_MyTable) it has a one-to-many relationship with the ACCOUNT table.
Next, we created picklist (myPickList) where the user will choose a value and that value will be entered into the custom table (C_MyTable).
I setup up the text field of the field (created a local join from LEFT join ACCOUNT to C_MyTable) and in the picklist field of the properties chose myPickList.
Now when I test it out by going to account details and choose a value from the pick list and click Save I get the following error:
Field 'C_MyTableID' must have a value
It seems like it's not entering the C_MyTableID, yet I checked the checkbox: Fied is Auto Increment in Database Manager for that field.
Any ideas how can insert an ID for that field?
We are using SalesLogix v7.2.1
Thank you in advance!
Solved! Go to Solution.
04-15-2009 10:57 AM
Based on your comment that you used a join from Account to C_MyTable on your data form I suspect you added an Account form rather than adding a data form based on C_MyTable.
Generally speaking you will add an Account form that has a datagrid to list your one to many records. You will add a data form based on your one to many table for the add/edit form.
Hope this helps!
04-15-2009 11:04 AM
04-15-2009 11:08 AM - edited 04-15-2009 11:09 AM
I am assuming you are working with the LAN client. Please correct me if I am mistaken.
You cannot databind picklist controls to tables - they are driven off of the picklist table. The SalesLogix databinding engine thinks you are trying to store data in the C_MyTable table, not use it as a lookup. You must use a dropdown control and programmatically populate the items collection with the contents of C_MyTable. You will databind that control to the appropriate Account column.
04-15-2009 12:23 PM
Yes we are using the LAN client.
And C_MyTable will be used to store the value chosen from the picklist, for the account that this currently displayed in the account detail view.
04-15-2009 01:05 PM
You cannot databind to a one-to-many table. The only tables that you can include on the Account Detail form, via databinding, are one-to-one tables. Was the table added as one-to-many by mistake?
04-15-2009 01:08 PM
You are right Timmus, it has a one-to-many relationship with the ACCOUNT table.
So how can I get this to work? I can't use a picklist?
We want to keep track of how many different values an account can have for this field based on the value chosen by the user from the picklist.
04-15-2009 01:11 PM
No you cannot use a picklist with the table structure you have in place. If you want to use a multi select picklist, simply add a column to the Account table and you can then databind a picklist control to it.
If you have existing data in the table then things become more interesting - especially if there is more than one column. In this case I would either add a new account tab that lists the records from the custom table and/or add a datagrid to the Account Detail that is bound to the custom table.
12-19-2010 04:29 PM
hi - I'm using the auto increment on the HISTORY table so I can insert bulk records through DTS/SSIS. I have checked the auto increment in the DB manager and am leaving the HISTORYID field out of my insert statement but am still getting the "cannot insert NULL" error. I have restarted the service/server after enabling auto increment, have set my connections using the SLX provider and have even tried run the SQL code within the SLX admin and client with the same result.
Anything else I need to do?