Sage100 BOI : AR_InvoiceDetail

SOLVED

We are currently exploring usage of the Sage100.ObjectManagement NuGet package (.NET 6 FYI).

I can create AR_InvoiceHeader and AR_InvoiceDetail line items.

Preface: Already have an instance of MasSession that is all well and good (authorized and functions) and we're working with invoices.

::: Code

using var createLineObject = session.CreateObject<ILineEntry>(request.ClassName, request.DisplayClassName, request.ModuleName);

var nextDocumentNumber = createLineObject.GetNextDocumentNumber();
createLineObject.SetKeyValue("InvoiceNo$", nextDocumentNumber);
createLineObject.SetKeyValue("InvoiceType$", "IN");
createLineObject.SetKey();

createLineObject.SetValue("ARDivisionNo$", "00");
createLineObject.SetValue("CustomerNo$", "EXCUST");
createLineObject.SetValue("TaxSchedule", "CA BA");

var lineCreated = createLineObject.AddLine();
var realLine = createLineObject.Lines;

-- Fill in all required line fields (removed for simplicity).

realLine.SetValue("Quantity$", 13.000);    -- This line is essentially ignored

realLine.SetValue("Quantity$", "13.000");    -- This line is essentially ignored

realLine.Write();

createLineObject.Write()

::: /Code

So, at the end of the day, the Quantity value that was set is ignored and then defaults to 1... thus, the resulting amount doesn't reflect the quantity provided.

It's as though there is no exposed quantity field... even though it quite literally exists here: https://help-sage100.na.sage.com/2020/FLOR/index.htm#File_Layouts/Accounts_Receivable/AR_InvoiceDetail.htm

On top of that, if I manually create an invoice and set a quantity/price/amount, those fields are unable to be acquired through recordset querying (again, as though they don't even exist).

I'm at a loss.