11/26/2024 2:27:12 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!
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.
|
|
|
|
Controlling a Managed Form
Posted: 19 Sep 06 8:35 AM
|
fiogf49gjkf0d I'm working with a managed form and I'm trying to understand how you code around managed forms, in regards to leave the Form open to give the user a chance to fix values I issued error messages about. My understanding was when the form is launched, in my case like code shown below, the managed form would not be closed unless ModalResult in the managed Form is set to something else then mrNone
When the OK button is hit in the managed form i run some validation when they fail I set Modalresult for the form to mrNone otherwise to mrOK.
But the form closes nevertheless. I even tried the oncloseQuery.
I assume I have to lauch or show the form again. I'm a little lost here, simply I don't understand how it is supposed to work. How do you code around managed forms?
Can anyone point me into the right direction?
I would really appreciate it.
Set objMainView = Application.MainViews.Add("Account:nu_add_edit_AccountProduct", 0, False) 'DNL Set objDetail = objMainView.DetailsView
If Caption = Application.Translator.Localize("Edit Account Product") Then 'DNL objDetail.CurrentID = DGAccountProduct.GetCurrentField("ACCOUNTPRODUCTID") 'DNL objMainView.SetDataMode 0, DGAccountProduct.GetCurrentField("ACCOUNTPRODUCTID") 'DNL objDetail.Script.Init("Edit") 'DNL End If
objDetail.Caption = Application.Translator.Localize(Caption)
If objMainView.ShowModal = mrOK Then DGAccountProduct.Refresh End If
Set objDetail = Nothing Set objMainView = Nothing |
|
|
| |
|
Re: Controlling a Managed Form
Posted: 20 Sep 06 1:03 PM
|
fiogf49gjkf0d Daniel,
The link to crm.ittoolbox.com wouldn’t load for me, so I’m not sure of the solution they presented. So forgive me if this is redundant.
One way of dealing with validation is to change the OK button’s Kind property from bkOk to bkCustom, so that it doesn’t automatically call the form close event when pressed. Then from the Ok button’s events, add some code to do your validation and if everything meets your criteria, then call the CloseCurrentView function.
~JC |
|
|
|
Re: Controlling a Managed Form
Posted: 20 Sep 06 2:02 PM
|
fiogf49gjkf0d Jeff,
That is exactly what the post in CRM.ITTOOLBOX.COM said. Thank you for your help. |
|
|
|
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!
|
|
|
|
|
|
|
|