You could put a Public Sub New() in the Global code and it should fire at the beginning of every import, but you will not have the session context or even know what import is being processed at that point. Other than that each profile code would need to call a common procedure in Global.
I have a sub in Global.vb
in Profile.vb (BeforeImport Event)
Public Sub ExportSQLtoCSV(strSQL As String, strFilename As String, myImpSession As importom.API.iImportSession)
call ExportSQLtoCSV("SELECT * FROM myView", "\\myServer\share\myExportFile.csv", import)
but I get error
Name 'ExportSQLtoCSV' is not declared
I'm new to .net so am wondering how to call the Global sub from within Profile. How should I declare the Global subs/Functions? is there something I need to do with the 'Imports' statement?
Thanks for any insight