var sessionLogon = new SessionLogon { CompanyCode = companyCode, UserLogon = new NetworkCredential { UserName = userName, Password = password }, ModuleCode = ModuleNames.AccountsReceivable, ModuleDate = DateTime.Today }; using (var sySession = new MasSession(homePath)) { sySession.InitSession(sessionLogon); using (var soInvoice = sySession.CreateObject<IMasBusinessObject>("SO_Invoice_bus", "SO_Invoice_ui", "S/O")) { soInvoice.SetValue("SalesPersonNo$", "0000"); soInvoice.SetValue("SalesPersonDivisionNo$", "00"); soInvoice.SetValue("ARDivisionNo$", "00"); soInvoice.SetValue("InvoiceType$", "IN"); soInvoice.SetValue("InvoiceNo$", "stapiIN"); soInvoice.SetValue("InvoiceDate$", "20220710"); soInvoice.SetValue("InvoiceDueDate$", "20220716"); soInvoice.SetValue("DiscountDueDate$", "20220716"); soInvoice.SetValue("TaxSchedule$", "DEFAULT"); soInvoice.SetValue("OrderDate$", "20220502"); soInvoice.SetValue("CustomerNo$", "0031330"); soInvoice.SetValue("TermsCode$", "00"); soInvoice.SetValue("OrderType$", "S"); soInvoice.SetValue("PrintInvoice$", "N"); soInvoice.SetValue("WarehouseCode$", "011"); var soInvoiceLn = sySession.CreateObject<ILineEntry>("SO_InvoiceDetail_Bus", "SO_InvoiceDetail_Bus", "S/O"); } }
Hello, we are getting an error when trying to create a line for a SO_Invoice using the Business Object dll in .net Sage100.ObjectManagementInterfaces
the error is message attempted to perform an unauthorized operation.