11/26/2024 8:26:09 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 writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Routines called when a modal form closes/why is it crashing?
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? |
|
|
|
Nevermind
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. |
|
|
|
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!
|
|
|
|
|
|
|
|