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: Product name field longer
Todd Daskal
Posts: 31
 
Product name field longerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 08 8:06 PM
I need to lengthen a field in the database "Product Name Field", it is 64 max char. and I need 80. I don’t see a way to edit the field length in Architect, so I created a new field, but this particular field will not let me associate with the new field as there is no “Text Properties” available?

Ideas...thanks
[Reply][Quote]
Robert Levine
Posts: 132
 
Re: Product name field longerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 08 10:17 PM
Yep, you have hit one of the most difficult areas in the application. If you look at the code for the Manage Product view, you will notice that the fields used as "filters" on that view (name, sku, etc.) have been subjected to a special 'cache' memory facility known as "User Options". For example:

Application.UserOptions.GetCategory("ManageProduct") 'DNL
With Application.UserOptions
'Assign the value of each option to its corresponding control
chkName.Text = .GetAsString("chkName", "ManageProduct") 'DNL
cboName.ItemIndex = GetItemIndex(cboName, .GetAsString("cboName", "ManageProduct")) 'DNL

You will have to register your new name field in the same manner. But that is only half of the story. Even after modifying the above code, you will get the same error message from your SQL statement because the controls (check box and text box) are not registered in the USEROPTIONDEF table. And there are no simple instructions allowing you to do so. Actually, the "Application.UserOptions." section in the Developers Reference does contain instructions for this purpose. There is, however, another approach you can take:

1. Take a backup of the database.
2. In SQL Server (Enterprise Manager), open the USEROPTIONDEF table, and add two new records populating the "Name" field with '', "Category" with 'ManageProduct', "CreateUser", "CreateDate", "ModifyUser", and "ModifyDate". And the second record for ''.
3. Create a special project in Architect containing an Insert Field for your new field in the PRODUCT table, and two Insert Record entries for the two new USEROPTIONDEF fields.
4. Make a bundle from this project.
5. Restore the database using the previous backup.
6. Install the new bundle.

This last sequence of steps is necessary because the SalesLogix OLE-DB Provider will not recognize additions simply made through SQL Server. And it is the SalesLogix OLE-DB Provider which is killing your SQL statement (which may actually work if you try it in SQL's Query Analyzer).

Once this has been done, your VBA script will work. And the bundle can then be applied to another SLX database where necessary. The alternative is to create a once only script using the Application.UserOptions commands, and that will take a lot longer.

Again, trust but verify: TAKE A BACKUP FIRST.
[Reply][Quote]
Robert Levine
Posts: 132
 
Re: Product name field longerYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Mar 08 10:23 PM
Note: a wee bit of my instructions above were somehow tructacted. In the USEROPTIONDEF table records, the Name field should contain the new control's name (ex: chkNewName), and the Category field should contain the form reference (ex: ManageProduct).
[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 4:37:51 AM