Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 2025 
 
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: Open a new form when field changes on accoutn detail view
Elina
Posts: 5
 
Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 11:30 AM
Hi,
I would like to have a form open up when account type value i changed to "Partner" and make all the fields on the form required.
I created the form and made the fields required. I do not know how to force the form to open up when a value on the account detail view is changed.
Any ideas?

Thanks!
[Reply][Quote]
Brian Mooy
Posts: 25
 
Re: Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 11:59 AM
I'm probably missing something here - it sounds too easy. You need to monitor for the OnChange event of the Account Type Control

Within that function, you need to do a simple check:

Sub onCtrlChange (sender)
If ctrl.Text = "Partner" and lastCtrl.Text <> "Partner" then
lastCtrl.Text = "Partner"
ShowForm
end if
End Sub

The lastCtrl control is to ensure that the text of the control has actually changed. The OnChange event fires off whenever the control may have changed - so you want to be careful not to show the form too frequently.

ShowForm is a subroutine which handles initialization, display, and saving of the child form, where necessary.

Hope this helps
Brian

[Reply][Quote]
Elina
Posts: 5
 
Re: Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 12:15 PM
forgive me if i am asking stupid questions. I am new to this.

How do i identify which form i want to show when i put in ShowForm?
I am also getting the following error message:
an error occurred... type mismatch: 'ShowForm'
[Reply][Quote]
Elina
Posts: 5
 
Re: Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 1:08 PM
Here is the code, i am also getting an error message about last variable:

Sub pklTypeChange(Sender)

if pklType.TEXT = "Partner" and lastpklType.TEXT <> "Partner" then
lastpklType.Text = "Partner"
Msgbox "Please Populate Partner Information.", 0+vbExclamation, "Missing Required Field"
ShowForm
End if

End Sub
[Reply][Quote]
Brian Mooy
Posts: 25
 
Re: Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 1:17 PM
ShowForm isn't a variable, it's a function placeholder that I declared to call the show window functionality of the form you've created. It may have a variable/saleslogix function blocking it, so you may need to use a new name for this function

It needs to look like this:

Sub ShowForm
Dim objMainView
Set objMainView = Application.MainViews.Add("System:YourFormName", 2, False) 'DNL
objMainView.Show
End Sub

Also keep in mind that your form will not be using standard control bindings when you save the results. You'll have to manage loading and saving the controls from the script.

If you're not sure how to do that, what I would recommend is instead of using the form you've created, use the Account Details form that this is already built on and show/hide the controls that you would display on the form instead (using ctrl.Visible = true; ctrl.Visible = false)
[Reply][Quote]
Elina
Posts: 5
 
Re: Open a new form when field changes on accoutn detail viewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Feb 08 2:02 PM
Thank you for your help. I think i will use your suggestion and show/hide controls instead of figuring out how to save the results.
[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 | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/23/2025 12:58:04 AM