
09-01-2009 09:28 AM - last edited on 09-01-2009 10:05 AM
Hi all.
I have the following script:
strSQL = "SELECT SD.TOTAL_SALES As TotalSales, SD.SALES_YEAR AS Year"
strSQL = strSQL & " FROM C_myTable SD"
strSQL = strSQL & " WHERE SD.ACCOUNTID = '" & Edit1.Text & "'"
Which is in an ACCOUNT FORM plugin.
When I release the plugin and view what is going on in the SLX Profiler it shows the line:
WHERE SD.ACCOUNTID = ''
But when I do the following in the script:
strSQL = "SELECT SD.TOTAL_SALES As TotalSales, SD.SALES_YEAR AS Year"
strSQL = strSQL & " FROM C_myTable SD"
strSQL = strSQL & " WHERE SD.ACCOUNTID = '123456' "
Then the profiler shows:
WHERE SD.ACCOUNTID = '123456'
The edit box does show the correct ACCOUNTID.
This form is opened after the end user clicks a button.
The button's OnClick event is as follows:
Application.BasicFunctions.DoInvoke "Form", "Personal: C_myForm"
Thank you in advance!
09-01-2009 10:11 AM
I got it to work by using: Application.BasicFunctions.CurrentAccountID