Epicor 10 BPM Data from another table

Yeah should work. :)

On Jun 19, 2014 10:50 AM, "will@... [vantage]" <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p><font face="Times New Roman" size="3">

I think I have it, it is at least working but would appreciate a quick
review that it is correct. I may have a
slight typo or spelling error but is this approach correct?

Â

Ice.Tables.UD01 UD01;

Â

var ttUD02_Row = ttUD02.FirstOrDefault(r =>
r.Added());

Â

int calcNum;

Â

foreach (var UD01_iterator in (from UD01_row in Db.UD01

                               where
UD01_row.Character01 == ttUD02_Row.Character01

                               select
UD01_row))

{

   UD01 =
UD01_iterator;

Â

   if (ttUD02_Row
!=null)

   {                            Â

               calcNum
=(int)UD01["Number01"]*2;

               ttUD02_Row.Number01= calcNum.ToString();


              UD01["Number02"] = calcNum.ToString();


              Â
UD01["Character02"] = "UD02";

               Db.SaveChanges();                                        Â


   }                       Â

}

Â

Â

Thank you

</div>
 


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

New to Epicor and going through an implementation/migration to
Epicor 10 – new install.  I am not new to
SQL, C#, or ERP systems.

 

Trying to create a BPM and I have went through all the help
and education documents I can find, but haven’t seen anything like what I am
trying to do.

 

Example of what I am trying to do:

BPM UD02.GetaNewUD02 / Post-Processing

 

Query UD01 where Character01 = UD02(Character01) and return
row (s)

Perform calculation against returned UD01 row(s)

                Exampe:
(UD01(Number01) * UD02(Number02)) / UD01(Number02)

Store the returned or calculated result in UD02 field
(Number01)

 

Do I need to make a reference to UD01 (Ice.Contracts.BO.UD01.dll)?

 

I am very new to Epicor and have found this group to be very
helpful in my quest for knowledge and hope someday I can get enough experience
to contribute.

 

I appreciate any guidance you can offer.

Basically run a LINQ Query out to the UD01 table such as, you don't need any new references.


var myrows = from x in Db.UD01 where x… select x


Then loop through myrows and calculate your total


Then assign your total to UD02.Number02 = myTotal


Let me know if this isn't clear enough


Jose C Gomez

Software Engineer


T: 904.469.1524 mobile

E: jose@…

http://www.josecgomez.com
     Â


Quis custodiet ipsos custodes?


On Wed, Jun 18, 2014 at 4:46 PM, will@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p></p><span><p><font face="Times New Roman" size="3">

New to Epicor and going through an implementation/migration to
Epicor 10 – new install. I am not new to
SQL, C#, or ERP systems.

Â

Trying to create a BPM and I have went through all the help
and education documents I can find, but haven’t seen anything like what I am
trying to do.

Â

Example of what I am trying to do:

BPM UD02.GetaNewUD02 / Post-Processing

Â

Query UD01 where Character01 = UD02(Character01) and return
row (s)

Perform calculation against returned UD01 row(s)

               Exampe:
(UD01(Number01) * UD02(Number02)) / UD01(Number02)

Store the returned or calculated result in UD02 field
(Number01)

Â

Do I need to make a reference to UD01 (Ice.Contracts.BO.UD01.dll)?

Â

I am very new to Epicor and have found this group to be very
helpful in my quest for knowledge and hope someday I can get enough experience
to contribute.

Â

I appreciate any guidance you can offer.

</div>
 


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

Thanks Jose,

 

I will have to test tomorrow when have access to the system, but
I understand the logic.

 

Wasn’t aware you could run a LINQ Query, can you do this in the form
customization also?

 

I know my original example did not include this but could I also
update UD01 in this same BPM?

 

Are there any documents that I could review that expand on the
documentation in the user guides, help files, and embedded education.  I
don’t remember seeing any good examples other than basic stuff.

 

 

Will Smith

ADfilm ltd. / acpo ltd.

will@…

 

You can't do Linq from the ui. You can update ud01 sane as you would do through entity framework.
Update the record, validate the db compete the context

On Jun 18, 2014 5:30 PM, "will@... [vantage]" <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p><font face="Times New Roman" size="3">

Thanks Jose,

Â

I will have to test tomorrow when have access to the system, but
I understand the logic.

Â

Wasn’t aware you could run a LINQ Query, can you do this in the form
customization also?

Â

I know my original example did not include this but could I also
update UD01 in this same BPM?

Â

Are there any documents that I could review that expand on the
documentation in the user guides, help files, and embedded education. I
don’t remember seeing any good examples other than basic stuff.

Â

Â

Will Smith

ADfilm ltd. /Â acpo ltd.


will@…

Â

</div>
 


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

I think I have it, it is at least working but would appreciate a quick
review that it is correct.  I may have a
slight typo or spelling error but is this approach correct?

 

Ice.Tables.UD01 UD01;

 

var ttUD02_Row = ttUD02.FirstOrDefault(r =>
r.Added());

 

int calcNum;

 

foreach (var UD01_iterator in (from UD01_row in Db.UD01

                                where
UD01_row.Character01 == ttUD02_Row.Character01

                                select
UD01_row))

{

    UD01 =
UD01_iterator;

 

    if (ttUD02_Row
!=null)

    {                             

                calcNum
=(int)UD01[“Number01”]*2;

                 ttUD02_Row.Number01= calcNum.ToString();

                UD01[“Number02”] = calcNum.ToString();

               
UD01[“Character02”] = “UD02”;

                Db.SaveChanges();                                         

    }                        

}

 

 

Thank you