Creating PO via BOI Write Issue

SOLVED

Hello All! I have an issue with creating a PO via BOI that I was hoping someone can help me with. We're using  Sage 100cloud Premium 2019 Version 6.10.4.0. Here's my code:

using (DispatchObject poObject = new DispatchObject(pvx.InvokeMethod("NewObject", "PO_PurchaseOrder_bus", oSS.GetObject())))
{
string poNumber = "";
object[] poPass = new object[] { poNumber };
SuccessCheck((int)poObject.InvokeMethodByRef("nGetNextPurchaseOrderNo", poPass));
poNumber = poPass[0].ToString();

SuccessCheck((int)poObject.InvokeMethodByRef("nSetKey", poPass));
object[] dateObject = new object[] { "PurchaseOrderDate$", date };
SuccessCheck((int)poObject.InvokeMethodByRef("nSetValue", dateObject));
object[] orderTypeObject = new object[] { "OrderType$", "S" };
SuccessCheck((int)poObject.InvokeMethodByRef("nSetValue", orderTypeObject));
object[] divisionNoObject = new object[] { "APDivisionNo$", "00" };
SuccessCheck((int)poObject.InvokeMethodByRef("nSetValue", divisionNoObject));
object[] vendorObject = new object[] { "VendorNo$", "0012631" };
SuccessCheck((int)poObject.InvokeMethodByRef("nSetValue", vendorObject));
object[] taxObject = new object[] { "TaxSchedule$", "NONTAX" };
SuccessCheck((int)poObject.InvokeMethodByRef("nSetValue", taxObject));

DispatchObject poLines = new DispatchObject(poObject.GetProperty("oLines"));
poLines.InvokeMethod("nAddLine");
object[] firstLine = new object[] { "ItemCode$", "EN22" };
object[] firstNumLine = new object[] { "", 2.05 };
SuccessCheck((int)poLines.InvokeMethod("nSetValue", firstLine));
firstNumLine[0] = "QuantityOrdered";
firstNumLine[1] = 3;
SuccessCheck((int)poLines.InvokeMethod("nSetValue", firstNumLine));
firstNumLine[0] = "UnitCost";
firstNumLine[1] = 1;
SuccessCheck((int)poLines.InvokeMethod("nSetValue", firstNumLine));
firstLine[0] = "PurchasesAcctKey$";
firstLine[1] = "120000CES";
SuccessCheck((int)poLines.InvokeMethod("nSetValue", firstLine));

string strHolder = "";
var rez = new object[2] { "LineKey$", strHolder };
var lkey = poLines.InvokeMethodByRef("nGetValue", rez);
poLines.InvokeMethod("nWrite");
SuccessCheck((int)poObject.InvokeMethod("nWrite"), poObject);
}

I'm fairly certain the issue is in the line item that I'm adding. I don't get any errors when setting the values but I do get a COMException: <Error: 0 in Method WRITE> when doing the final write for the PO Object. I've tried removing things and setting it with the bare minimum values per the docs but no success.