After comparing column by column – I went with UpdateExt and it seems to work
I am turning it loose for the production workers to hammer on it and see what breaks
Thanks!!
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 8:02 PM
To: Vantage
Subject: Re: [Vantage] E10 - More WCF fun
Start with the LaborDtl and work your way up its likely LaborDtl or LaborHed
Jose C Gomez
Software Engineer
T:
904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, May 13, 2015 at 5:59 PM, Bernie Walker bwalker@... [vantage] <vantage@yahoogroups.com> wrote:
That’s kind of what I thought – think it might just be in the LaborDtl table or do I need to check like all 20 of them?????
Thanks.
From:
vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, May 13, 2015 4:21 PM
To: Vantage
Subject: Re: [Vantage] E10 - More WCF fun
So this is an issue that I've ran into with several BO's sometimes the BO needs a field to be populated even when it is not directly being used. Your best bet is to compare your WCFTableSet data to a Full Trace Data from Epicor and ensure that every field that is populated on the Epicor Side is also populated on your WCF Call. OR you may get lucky and try to use the UpdatExt method sometimes that bypasses those issues.
On Wed, May 13, 2015 at 3:48 PM, bwalker@... [vantage] <vantage@yahoogroups.com> wrote:
I nearly have my WCF web App complete but have run into the dastardly "Object reference not set to an instance of an object" error
the app is using the LaborSvc
I can Start an Activity by doing:
var ts = laborClient.GetByID([LaborHedSeq]);
laborClient.StartActivity(LaborHedSeq], "P", ref ts);
laborClient.DefaultJobNum(ref ts, JobNum);
laborClient.DefaultOprSeq(ref ts, <OpSeq>);
var newRow = ts.LaborDtl.Where(n => n.RowMod.Equals("A", StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
string resourceID = newRow.ResourceID;
laborClient.CheckWarnings(ref ts);
laborClient.CheckEmployeeActivity(<EmployeeNum>, <LaborHedSeq>,<JobNum.>, 0, <OpSeq>, resourceID);
laborClient.SetClockInAndDisplayTimeMES(ref ts);
laborClient.Update(ref ts);
When I try to End Activity by doing:
var ea = laborClient.GetDetail(LaborHedSeq>, <LaborDtlSeq>);
foreach (LaborDtlRow ldr in ea.LaborDtl)
{
ldr.RowMod = "U";
}
laborClient.EndActivity(ref ea);
laborClient.DefaultLaborQty(ref ea, <Qty>);
laborClient.CheckWarnings(ref ea);
laborClient.Update(ref ea); <----- Error Occurs Here
The update Method works when Starting an Activity but fails when Ending an Activity
I am pretty sure Object not set to object is not telling the correct story as that very same blasted object works in all the steps prior and contains data