Issue to point to the production company using BOI C#.Net integration

Hi ALL,

I am using BOI with the C#.Net code to import data into Sage 100, I tested the program in with the test company, Now I am trying to import data into the other company but it still importing data into the test company. I changed the company code which in which I want to import the data but still importing into previous one.

Can anyone suggest me the solution or hint to resolve this issue, Please?

Thanks,

SF

  • 0
    Posting some of the code maybe. Just saying.
  • 0 in reply to BigLouie
    pvx = System.Activator.CreateInstance(Type.GetTypeFromProgID("ProvideX.Script",true));

    // Replace the text "*PATH TO MAS90\HOME*" with the correct MAS90\Home path in the line below
    pvx.GetType().InvokeMember("Init", BindingFlags.InvokeMethod, null, pvx, new object[] { ConfigurationManager.AppSettings["SagePath"].ToString() });

    // Instantiate a new Session object and initialize the session
    // by setting the user, company, date and module
    oSS = pvx.GetType().InvokeMember("NewObject", BindingFlags.InvokeMethod, null, pvx, new object[] { "SY_Session" });

    retVal = oSS.GetType().InvokeMember("nSetCompany", BindingFlags.InvokeMethod, null, oSS, new object[] { ConfigurationManager.AppSettings["CompanyName"].ToString() });

    retVal = oSS.GetType().InvokeMember("nSetDate", BindingFlags.InvokeMethod, null, oSS, new object[] { "S/O", "24022017" });

    oSS.GetType().InvokeMember("nSetModule", BindingFlags.InvokeMethod, null, oSS, new object[] { "S/O" });


    retVal = oSS.GetType().InvokeMember("nSetUser", BindingFlags.InvokeMethod, null, oSS, new object[] { ConfigurationManager.AppSettings["SageUsername"].ToString(), ConfigurationManager.AppSettings["SagePassword"].ToString() });