Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 30, 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 - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Automating Add/Edit Form
muni1900
Posts: 21
 
Automating Add/Edit FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: Automating Add/Edit FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
muni1900
Posts: 21
 
Re: Automating Add/Edit FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Willem Meert
Posts: 1
 
Re: Automating Add/Edit FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[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/30/2024 10:32:45 AM