E10 Primary Bin Num BPM Issue

The business object is ALWAYS a better choiceÂ


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jul 28, 2016 at 3:09 PM, chan213419@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Hello Jose (or anyone else with input): I was wondering, since a BPM can update records via the BO or the database: this begs the question, which is better?</p>

</div><span class="ygrps-yiv-1965560983">
 


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


In Part Maintenance, when I go to the Sites --> Warehouses --> Primary Bin tab and update the Primary Bin, i get conflicting data from the Trace.

The Trace says that PartWhse.PrimBinNum is being updated, but this field doesn't exist in Epicor.  The only field close to PrimBinNum that I've been able to find is in the PlantWhse table called PlantWhse.PrimBin.

I'm trying to write a BPM that automatically adds the Primary Bin to a newly created part.  When I have my BPM update PlantWhse.PrimBin, it does update the Table.Field, but when I look at the part record in the tab mentioned above the Primary Bin is still blank... so it looks like PlantWhse isn't what I need.

The problem with PartWhse is that PrimBinNum, nor PrimBin exist.  When I try to update PartWhse.PrimBin or PartWhse.PrimBinNum I get an error in the BPM that says the field doesn't exist.

Has anyone updated the Primary Bin for a Part record with a BPM in E10? If so what did you update?

All/Any help is appreciated.... this one has me really confused, especially the trace clearly showing PartWhse.
Use the BO to do so :-) in your BPM


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Tue, Jul 26, 2016 at 4:01 PM, chan213419@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>In Part Maintenance, when I go to the Sites --&gt; Warehouses --&gt; Primary Bin tab and update the Primary Bin, i get conflicting data from the Trace.</p><div><br></div><div>The Trace says that PartWhse.PrimBinNum is being updated, but this field doesn&#39;t exist in Epicor.  The only field close to PrimBinNum that I&#39;ve been able to find is in the PlantWhse table called PlantWhse.PrimBin.</div><div><br></div><div>I&#39;m trying to write a BPM that automatically adds the Primary Bin to a newly created part.  When I have my BPM update PlantWhse.PrimBin, it does update the Table.Field, but when I look at the part record in the tab mentioned above the Primary Bin is still blank... so it looks like PlantWhse isn&#39;t what I need.</div><div><br></div><div>The problem with PartWhse is that PrimBinNum, nor PrimBin exist.  When I try to update PartWhse.PrimBin or PartWhse.PrimBinNum I get an error in the BPM that says the field doesn&#39;t exist.</div><div><br></div><div>Has anyone updated the Primary Bin for a Part record with a BPM in E10? If so what did you update?</div><div><br></div><div>All/Any help is appreciated.... this one has me really confused, especially the trace clearly showing PartWhse.</div><p></p>

</div>
 


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

Are you updating the primary warehouse first? If you don't have a primary warehouse, you can't have a primary bin.
So I would add the code just as I do when using a BO in a customization to update a record?
Yessir, Primary warehouse exists.
you would write the code to mimic what you do in the UI but in the BPM side of things.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Tue, Jul 26, 2016 at 4:17 PM, chan213419@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Yessir, Primary warehouse exists.</p>

</div>
 


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

Thank you for your direction Jose, I feel that I'm close, but now I have what looks like one more hurdle to clear.  The code below compiles, but when I execute the BPM I get the error of:

"Type Erp.Proxy.BO.PartImpl is not a service contract"  I think my issue is somewhere where I'm declaring my service, but I can't for the life of me figure out what I need.  If I put in Erp.Contracts.BO.Part, or Erp.Contracts.BO.PartImpl, i get compile errors.

var Partsvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Proxy.BO.PartImpl>(Db);
var PartDataSet = new Erp.Tablesets.PartTableset();

if (Partsvc != null)
{
     Erp.BO.PartDataSet vDS = Partsvc.GetByID(ttPartRow.PartNum);
     foreach(Erp.BO.PartDataSet.PartWhseRow dr in vDS.PartWhse.Rows)
     {
          dr.PrimBinNum = "B1";
     }
Partsvc.Update(vDS);
}

Can anyone point out what I'm missing/doing-wrong?  Thank you for your help.

Look at the programmers guide in EpicWeb it has examplkes of how to do this.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Jul 27, 2016 at 3:31 PM, chan213419@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>Thank you for your direction Jose, I feel that I&#39;m close, but now I have what looks like one more hurdle to clear.  The code below compiles, but when I execute the BPM I get the error of:</p><div><br></div><div>&quot;Type Erp.Proxy.BO.PartImpl is not a service contract&quot;  I think my issue is somewhere where I&#39;m declaring my service, but I can&#39;t for the life of me figure out what I need.  If I put in Erp.Contracts.BO.Part, or Erp.Contracts.BO.PartImpl, i get compile errors.</div><div><span style="word-spacing:normal;"><br></span></div><div><span style="word-spacing:normal;">var Partsvc = Ice.Assemblies.ServiceRenderer.GetService&lt;Erp.Proxy.BO.PartImpl&gt;(Db);</span><br></div><div><div>var PartDataSet = new Erp.Tablesets.PartTableset();</div><div><br></div><div>if (Partsvc != null)</div><div>{</div><div>     Erp.BO.PartDataSet vDS = Partsvc.GetByID(ttPartRow.PartNum);</div><div>     foreach(Erp.BO.PartDataSet.PartWhseRow dr in vDS.PartWhse.Rows)</div><div>     {</div><div>          dr.PrimBinNum = &quot;B1&quot;;</div><div><span style="word-spacing:normal;">     }</span></div><div><span style="word-spacing:normal;">Partsvc.Update(vDS);</span></div><div>}</div><div><br></div><div>Can anyone point out what I&#39;m missing/doing-wrong?  Thank you for your help.</div></div><div><br></div><p></p>

</div><span class="ygrps-yiv-907582816">
 


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


Thanks again Jose, I got it working, but will still check code against the Programmers Guide to see if it's sound.  Takes a little too long to process for my liking.
Hello Jose (or anyone else with input): I was wondering, since a BPM can update records via the BO or the database: this begs the question, which is better?