You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 10, 2020. It is now read-only.
I am trying to add TrackingCategory value to invoice line and I receive an error "Object reference not set to an instance of an object).
` LineItem li = new LineItem();
li.LineAmount = inv.LineItems[i].LineAmount;
li.ItemCode = inv.LineItems[i].ItemCode;
li.Description = inv.LineItems[i].Description;
li.AccountCode = inv.LineItems[i].AccountCode;
li.UnitAmount = inv.LineItems[i].UnitAmount;
var categories = inv.Categories.Where(c => c.TicketChargeLineId == inv.LineItems[i].TicketChargeLineId);
foreach(var c in categories)
{
if(c.Value != "")
{
li.Tracking = new ItemTracking();
`
It seems to work but when I look at the invoices in Xero, the Tracking Category fields are blank.