11/30/2024 6:35:41 AM
|
|
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 usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
|
|
|
|
Automating Add/Edit Form
Posted: 05 Oct 07 2:40 PM
|
Hi,
I am new to SalesLogix (using v.6.2.4). I was wondering how I could associate an add/edit form so that when the user selects the "Add" option from the pop-up menu, it will bring up an empty form and when the user clicks OK button, it will insert to the database. Currently, I am able to bring up the empty form but saving to database is not coming to me.
So far, I have been using vbscripts to do this whole task and recently I came to know that many of what I coded could be automated. I am sure maintaining would be a lot easier if this can be automated. Thanks in advance for your advice.
Muni |
|
|
|
Re: Automating Add/Edit Form
Posted: 05 Oct 07 3:44 PM
|
It might be beneficial to get some training on this. You might also look into DevLogix as a resource for finding this information out. But to answer your immediate question is you can have a form setup where the fields are bound to the database. To have this form used as a popup from a datagrid you just need to setup the EditView property of the datagrid to point to this databound form.
Ted |
|
|
|
Re: Automating Add/Edit Form
Posted: 05 Oct 07 4:02 PM
|
Hi Ted,
Thanks for the reply. I have already bound the fields to the db and also I setup did the EditView property, that's how I was able to bring up the empty form.
Even though I have the fields bound to the database it is not doing an insertion. Is there any other property that I have to set? I didn't know about devlogix, thanx for that - I will look into it.
Muni |
|
|
|
Re: Automating Add/Edit Form
Posted: 30 Nov 07 12:37 PM
|
Hi Muni,
I just had the same problem as you described. And I searched a bit more here on the site, and found an example bundle to do exactly that (lookupedit control demo). I installed that and tested it: the demo works perfectly and does that whole add/edit job without any line of scripting/coding.
I examined it a bit further and found what is wrong with my form: it uses the ACCOUNTPRODUCT table in which I added myself some data (from an external source of our previous software we used), and the "adding" code from SLX generates a key for the ID field which I already used myself. Because of the duplicate primary key, the database won't permit the creation of that new record.
My solution was to manually shift the auto generated key to a number after my selfgenerated keys. Open the SITEKEYS table and find the corresponding key. In my case, the "Other" key type was used. (KEYTYPE=25)
Hope my explanation is a bit understandable.
Only thing that remains is why SLX does not throw a warning or error message while trying to insert the record...
Willem
|
|
|
|
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!
|
|
|
|
|
|
|
|