Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Sunday, August 24, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
8/24/2025 12:39:03 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!
Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix Scripting & Customization
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: closing form on error
Bob Nerren
Posts: 19
closing form on error
Posted: 10 Jul 08 4:54 PM
I want to add code to a custom form (in slx 6.2) so that if an error is encountered, the form will close and the system will refresh automatically. My problem is that my lines to close the form and do the refresh seem to be ignored. Here's the code I've tried:
vError = err.number
If vError <> 0 Then
Err.Clear
MsgBox "An error was encountered. When you click OK, this screen will close and your system will be refreshed. If the problem persists, please notify the Help Desk."
application.BasicFunctions.CloseCurrentView TRUE
application.BasicFunctions.RefreshMainView
End If
For testing, I added a line in my script that causes an error. When I run the code I get the message box then nothing else. I can put another rmessagebox afer the refreshmainview command, and that message box pops up too. Any ideas on why those 2 commands are not executed?
[
Reply
][
Quote
]
Ryan Farley
Posts: 2265
Re: closing form on error
Posted: 10 Jul 08 6:36 PM
Try ModalResult = mrCancel
[
Reply
][
Quote
]
Bob Nerren
Posts: 19
Re: closing form on error
Posted: 10 Jul 08 7:53 PM
Ryan, same result using ModalResult = mrCancel. Maybe some more background will help: The code is being called from a datagrid using the CustomDrawCell event. The reason I'm trying to have the form close automatically on error is that I've had a user get an error in the code that runs on that event and got caught in an endless error loop (maybe not endless but it would have take several hundred mouseclicks to get out).
I've not been able to recreate the error and I've got several hundred very non=technical users who would have no clue how to use the task manager to kill slx. Does this give you any other ideas on why the commands to close the form aren't working, or maybe some other way to handle the problem?
[
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 © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 8/24/2025 1:09:34 PM