Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, February 21, 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: Passing ModalResult via Global Variable
Leigh Devine
Posts: 4
 
Passing ModalResult via Global VariableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Oct 13 10:37 AM
fiogf49gjkf0d

Hi,


I have been trying something I presumed pretty straight forward, I am trying to pass the ModalResult for an OK or a Cancel button (i.e. 1 or 2) through to another form and inserting them into a variable so I can proceed with an update if the varible = 1.


My form is pretty simple and I have declared my Global Variable as below (a.).  I have called the Global variable into a variable on my second form as below (b.) to use for my updates.


I am getting the error 'Type mismatch; 'strResult'', as you can see I have used a msgbox to see if the ModalResult is being passed through and it is not.


I have also tried using an Application.Globalinfo.Add? to set the variable.  I cannot find much advice on Global Variables online and would really appreciate it if anybody could advise/point me in the right direction.


Leigh


 


a.


Dim globstrBankDetailsUpdateScreenClose


Sub AXFormClose(Sender)


    'Application.BasicFunctions.GlobalInfoClear
    Application.BasicFunctions.GlobalInfoSet"globstrBankDetailsUpdateScreenClose", frmBankDetailUpdate.ModalResult


End Sub


b.


Sub cmdUpdateBankDetails(Sender)


    Dim strSQL
    Dim objSLXDB
    Dim strConfirm
    Set objSLXDB = New SLX_DB


    Application.BasicFunctions.DoInvoke "Form","Personal:BankDetailUpdate"


    strConfirm = Application.BasicFunctions.GlobalInfoFor("globstrBankDetailsUpdateScreenClose")


    msgbox strConfirm


    If strConfirm = 1 then


 

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Passing ModalResult via Global VariableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Oct 13 6:59 PM

I always pass modality between views using MainView objects.....many explanations of how to do that are up here....


I'd put a MsgBox in the AXFormClose to make sure it is even firing.....


 


don't know what version of SLX you are on....


 


but


Dim MyValue


myvalue =cINT( txtSomething.text )


Application.GlobalInfo.Add "globstrBankDetailsUpdateScreenClose", myvalue


 


and


Dim MyGlobal


MyGlobal= Application.GlobalInfo.globstrBankDetailsUpdateScreenClose


If MyGlobal = 1 Then


works fine for me....


 


 

[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): 2/21/2025 11:51:05 PM