E10 - More WCF fun

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.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

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

 



 




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

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.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, May 13, 2015 at 3:48 PM, bwalker@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p><span>I nearly have my WCF web App complete but have run into the dastardly &quot;Object reference not set to an instance of an object&quot; error</span></p><p><span><br></span></p><p><span>the app is using the LaborSvc</span></p><p><span><br></span></p><p><span>I can Start an Activity by doing:</span></p><p><span><br></span></p><p><span>var ts = laborClient.GetByID([LaborHedSeq]);<br>laborClient.StartActivity(LaborHedSeq], &quot;P&quot;, ref ts);<br>laborClient.DefaultJobNum(ref ts, JobNum);<br>laborClient.DefaultOprSeq(ref ts, &lt;OpSeq&gt;);<br>var newRow = ts.LaborDtl.Where(n =&gt; n.RowMod.Equals(&quot;A&quot;, StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();<br>string resourceID = newRow.ResourceID;<br>laborClient.CheckWarnings(ref ts);<br>laborClient.CheckEmployeeActivity(&lt;EmployeeNum&gt;, &lt;LaborHedSeq&gt;,&lt;JobNum.&gt;, 0, &lt;OpSeq&gt;, resourceID);<br>laborClient.SetClockInAndDisplayTimeMES(ref ts);<br>laborClient.Update(ref ts);</span></p><p><span><br></span></p><p><span><br></span></p><p><span>When I try to End Activity by doing:</span></p><p><span><br></span></p><p><span>var  ea = laborClient.GetDetail(LaborHedSeq&gt;, &lt;LaborDtlSeq&gt;);<br>            foreach (LaborDtlRow ldr in ea.LaborDtl)<br>            {<br>                ldr.RowMod = &quot;U&quot;;<br>            }<br>            laborClient.EndActivity(ref ea);<br>            laborClient.DefaultLaborQty(ref ea, &lt;Qty&gt;);<br>            laborClient.CheckWarnings(ref ea);<br><br>            laborClient.Update(ref ea);  &lt;----- Error Occurs Here</span></p><p><span><br></span></p><p><span>The update Method works when Starting an Activity but fails when Ending an Activity</span></p><p><span><br></span></p><p><span><br></span></p><p><span>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</span></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

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.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

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

 




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:

Â
<div>
  
  
  <p>

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.



Jose C Gomez

Software Engineer


T: 904.469.1524 mobile

E: jose@...
http://www.josecgomez.com
 Â
   Â


Quis custodiet ipsos custodes?

Â

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

Â




</div>
 


<div style="color:#fff;min-height:0;"></div>