This commit is contained in:
2021-08-27 17:16:39 +00:00
parent 32c06ce50f
commit 9cd6c677f9

View File

@@ -35,7 +35,7 @@ namespace AyaNova.PlugIn.V8
public string PluginVersion public string PluginVersion
{ {
get { return "7.6.1-alpha.127"; } get { return "7.6.1-alpha.126B"; }
} }
public string About public string About
@@ -4267,14 +4267,14 @@ namespace AyaNova.PlugIn.V8
ScheduleMarker c = ScheduleMarker.GetItem(i.LT_O_ScheduleMarker.Value); ScheduleMarker c = ScheduleMarker.GetItem(i.LT_O_ScheduleMarker.Value);
//Many schedulemarkers may not have related records so allow for that!! //Many schedulemarkers may not have related records so allow for that!!
if (c.IsFollowUp) if (c.IsFollowUp)
{ {
List<string> tags = new List<string>(); List<string> tags = new List<string>();
AddImportTag(tags); AddImportTag(tags);
dynamic d = new JObject(); dynamic d = new JObject();
progress.Op("FollowUp " + c.ID.ToString());
//export //export
@@ -4343,10 +4343,14 @@ namespace AyaNova.PlugIn.V8
Workorder o = Workorder.GetWorkorderByRelativeNoMRU(RootObjectTypes.WorkorderQuote, c.FollowID); Workorder o = Workorder.GetWorkorderByRelativeNoMRU(RootObjectTypes.WorkorderQuote, c.FollowID);
woid=o.ID; woid=o.ID;
} }
catch (FetchException ex) catch (Exception ex)
{ {
progress.Append("Follow up for quote skipped due to quote non-existance"); if (ex is FetchException || ex is System.Security.SecurityException)//Note: workorder will throw a security exception if resulting ID is guid.empty for...reasons..
continue; {
progress.Append("Follow up for Quote skipped due to Quote non-existance");
continue;
}
throw;
} }
v8FollowId = await Getv7v8IdMapNullOk(woid, RootObjectTypes.Workorder, false, true); v8FollowId = await Getv7v8IdMapNullOk(woid, RootObjectTypes.Workorder, false, true);
if (v8FollowId == null) if (v8FollowId == null)
@@ -4366,10 +4370,14 @@ namespace AyaNova.PlugIn.V8
Workorder o = Workorder.GetWorkorderByRelativeNoMRU(RootObjectTypes.WorkorderPreventiveMaintenance, c.FollowID); Workorder o = Workorder.GetWorkorderByRelativeNoMRU(RootObjectTypes.WorkorderPreventiveMaintenance, c.FollowID);
woid = o.ID; woid = o.ID;
} }
catch (FetchException ex) catch (Exception ex)
{ {
progress.Append("Follow up for PM skipped due to PM non-existance"); if (ex is FetchException || ex is System.Security.SecurityException)//Note: workorder will throw a security exception if resulting ID is guid.empty for...reasons..
continue; {
progress.Append("Follow up for PM skipped due to PM non-existance");
continue;
}
throw;
} }
v8FollowId = await Getv7v8IdMapNullOk(woid, RootObjectTypes.Workorder, false, true); v8FollowId = await Getv7v8IdMapNullOk(woid, RootObjectTypes.Workorder, false, true);
if (v8FollowId == null) if (v8FollowId == null)
@@ -4398,7 +4406,7 @@ namespace AyaNova.PlugIn.V8
SetTags(d, tags); SetTags(d, tags);
progress.Op("FollowUp " + c.ID.ToString());
var rMainObject = await util.PostAsync("review", d); var rMainObject = await util.PostAsync("review", d);
long RavenId = util.IdFromResponse(rMainObject); long RavenId = util.IdFromResponse(rMainObject);
Addv7v8IdMap(c.ID, RavenId); Addv7v8IdMap(c.ID, RavenId);