From 834bf7703df6f2349b55a97246a2bd77b2cea520 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 2 Jul 2022 00:50:20 +0000 Subject: [PATCH] --- AyaNovaQBI/Integration.cs | 4 ++-- AyaNovaQBI/Map.cs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AyaNovaQBI/Integration.cs b/AyaNovaQBI/Integration.cs index 931405b..b472525 100644 --- a/AyaNovaQBI/Integration.cs +++ b/AyaNovaQBI/Integration.cs @@ -37,8 +37,8 @@ namespace AyaNovaQBI public AyaType AType { get; set; } - public string IntegrationItemId { get; set; }//foreign id (e.g. QB Id) - public string IntegrationItemName { get; set; }//foreign object's name for UI, not required if not displayed anywhere + public string IntegrationItemId { get; set; } = String.Empty;//foreign id (e.g. QB Id) + public string IntegrationItemName { get; set; } = String.Empty;//foreign object's name for UI, not required if not displayed anywhere public DateTime? LastSync { get; set; }//optional, used by qbi public string IntegrationItemData { get; set; }//foreign object data store for this item, unused by any AyaNova add-on's in the past but might be useful for others, expect json or xml or some other text value here diff --git a/AyaNovaQBI/Map.cs b/AyaNovaQBI/Map.cs index f9cf2ca..df12490 100644 --- a/AyaNovaQBI/Map.cs +++ b/AyaNovaQBI/Map.cs @@ -106,6 +106,10 @@ namespace AyaNovaQBI if (DisplayRow(bLinked)) { var qbItem = util.QBIntegration.Items.FirstOrDefault(z => z.AType == _Type && z.Id == i.Id); + if (qbItem == null) + { + qbItem = new IntegrationItem(); + } _aya.Rows.Add(new object[] { i.Id, qbItem.IntegrationItemId, i.Name, qbItem.IntegrationItemName }); }