Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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 - 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 ThreadView:  Search:  
 Author  Thread: Routines called when a modal form closes/why is it crashing?
Zaurusman
Posts: 44
 
Routines called when a modal form closes/why is it crashing?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jul 06 3:19 PM
fiogf49gjkf0d
Hi all,

I'm working with the Insert Opportunity Wizard in 6.2.3 and have made some modifications to it, the most relevant of which is adding a control and making it required by adding logic to catch it as being empty. In both cmdOKClick() and SaveOpportunity() I've found code like this:

If txtDescription.text = "" then
frmInsertOpportunity.modalresult = mrNone
MsgBox "Please enter a Description for this opportunity."
txtDescription.SetFocus
Exit Function
End If

I dunno if it came that way or our business partner did this for us, but either way, it works in previous versions of the form. Now I've added a control and several other things, but the only change I've done here was to simply do the same for the one required control I've added:

If pklLikelihood.text = "" then
frmInsertOpportunity.modalresult = mrNone
MsgBox "Please enter a likelihood of closing for this opportunity."
txtDescription.SetFocus
Exit Function
End If

Here's what happens when it's running. If you open the form to insert an opp and don't fill anything out, hit the OK button, it stops at the first checkpoint in the list (description) and pops up the message box asking for one to be filled out. Then the form disappears, and SalesLogix, though visible, can no longer be focused on by Windows ad infinitum until you kill it with Task Manager and re-open the application.

I put message boxes in all the subroutines and functions I figured could be called as the form insists on shutting down anyway, and found that it follows this pattern:

cmdOkClick
AXFormCloseQuery
AXFormClose

I put a msgbox before and after the only line of code in the last one, which is:

Set objSLXDB = Nothing

And apparently it's working after that line of code as well. But with the addition of the msgbox's, now it gives an error that I cannot read because it starts generating, over and over again, the error

System Error. Code: 1400
Invalid window handle.

Where to look now?
[Reply][Quote]
Zaurusman
Posts: 44
 
NevermindYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jul 06 3:35 PM
fiogf49gjkf0d
Looks like it's done this all along, so I'll be outsourcing it to the 3rd party that developed the logic.

Moderator(s) feel free to delete this.
[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/26/2024 8:39:41 AM