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: Controlling a Managed Form
Daniel Bechtel
Posts: 9
 
Controlling a Managed FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Daniel Bechtel
Posts: 9
 
Re: Controlling a Managed FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Sep 06 1:16 PM
fiogf49gjkf0d
Ok,
I found the issue.
I actually did everything correctly, but was not sure. It seams to be there is a difference in how manged forms do validations.
I found the following link, which describes the same problem I had and the resolution in regards to that.
I hope that helps in case someone runs into the same issue.

http://crm.ittoolbox.com/groups/technical-functional/saleslogix-l/required-field-on-a-manage-form-slx-61-429264


I looks like I should hold my posts for a couple more hours so I can resolve it before I post it

[Reply][Quote]
Jeff Crawford
Posts: 52
 
Re: Controlling a Managed FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Daniel Bechtel
Posts: 9
 
Re: Controlling a Managed FormYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[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 3:34:16 PM