Update AR Deposit Invoice price via BPM/ERP Function Error

Hi,
I am trying to update AR Deposit invoice via the Update and UpdateMaster but kept getting errors (attached). Attached is also my function code. Any assistance would be much appreciated.

var ts = so.GetByID(invoiceNum);
so.OnChangeofLineExtPrice(invDtl.InvoiceNum,1,amt, ref ts);
so.UpdateMaster(…)

Thanks in advance,
Peter

UpdateExtPrice.cs (2.3 KB)
UpdateInvoicePriceError.txt (3.3 KB)