I'm trying to create a new module in SAP B1 SDK with visual studio (C#), and I have those variables inside the main class :
public static SAPbouiCOM.Application oApplication = null;
public static SAPbobsCOM.Company oCompany = null;
public static SAPbouiCOM.Form oForm = null;
and also in other classes I defined the same variables, so whenever I try to execute and get this error :
An unhandled exception of type 'System.NullReferenceException' occurred in MyFirsttest.exe
Additional information: La référence d'objet n'est pas définie à une instance d'un objet.
I would like to know if their is any way to define those variables once and for all, so I can use them in other classes.