Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 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: MsgBox Prompt
Developer Jim
Posts: 6
 
MsgBox PromptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 10:50 AM
fiogf49gjkf0d
Is there a way i can prompt the user with a message box style prompt, but allow them to choose either yes or no?
choosing "yes" would continue processing the procedure they're in, "no" would exit.

Thanks,
Jim
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: MsgBox PromptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 11:42 AM
fiogf49gjkf0d
I believe the MsgBox is an inherent VBScript function. Here's a rundown of what it does from my fav VBScript reference site: http://www.devguru.com/technologies/vbscript/13955.asp

MsgBox can be called as a sub, or you can set a variable to it's return (integerReturn = MsgBox("Blah"). You simply read the variable for the Yes or No response and continue processing accordingly.

One caveat: SalesLogix behaves slightly differently. For example to get a MsgBox with just the OK button, I have to use the VbYes constant for the buttons. You may have to tweak the numbers/constants to get the desired effect. The return constants don't exhibit this problem, so VBOK will really register the OK button.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: MsgBox PromptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 12:18 PM
fiogf49gjkf0d
You'd use:

If MsgBox("Do you want to do it?", 36, "Question") = 6 Then
' do something
End If


The 3 parameters used for MsgBox are:
1) Question text
2) 36 = The values for vbYesNo (4) and vbQuestion (32 - gives it the question icon on the prompt) added together
3) Title of the prompt

Return value is a 6 (vbYes) if they hit Yes.

You will find the official VBScript docs invauable to find this sort of thing out for SLX scripting. As Jeremy mentioned, the VBScript used in SLX is just plain old VBScript, nothing specific to SLX. You can grab the VBScript docs here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=30
[Reply][Quote]
Developer Jim
Posts: 6
 
Re: MsgBox PromptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 1:44 PM
fiogf49gjkf0d
Thanks so much! that is exactly what i was looking for.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: MsgBox PromptYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 5:43 PM
fiogf49gjkf0d
In v7.0.x take a look at the SalesLogix provided vbscript:
SYSTEM:SLX Util

There's a whole series of "wrapped" msgBox" setups that you can use.:
ShowError
ShowErrorEx
ShowErrorFmt
ShowMessage
ShowMessageEx
ShowMessageFmt
ShowWarning
ShowWarningQuestion

Just "include" the script anad have a nice day!

--
rjl
[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): 6/18/2025 6:35:16 AM