I am trying to create a simple BPM using the JobHead.Update method and custom code.
I am fluent in 4GL and have done some C programming (years ago).
I am hoping someone out there may have a C# BPM Custom Code example they would be willing to share?
I'm pretty sure if I could see a sample I could expand and extrapolate for my own use.
Thanks in advance,
Dave Olender
Ph: 651-246-3281
Hi Dave,
I keep templates to help me. Here is my update one.
Erp.Tables.XXX XXX;
Erp.Tables.XXX_UD XXX_UD;
using (var txscope = IceDataContext.CreateDefaultTransactionScope())
{
foreach (var XXX_Recs in (from XXX_Row in Db.XXX
var XXX_Recs = (from XXX_Row in Db.XXX
from XXX_UD_Row in Db.XXX_UD
where XXX_Row.Company == Session.CompanyID
&& XXX_Row.SysRowID == XXX_UD_Row.ForeignSysRowID
&& XXX_Row.YYY == false
select new { XXX_Row, XXX_UD_Row })).FirstOrDefault();
{
if (XXX_Recs != null)
{
XXX_Recs.XXX_Row.YYY = false;
XXX_Recs.XXX_UD_Row.YYY = false;
Db.Validate(XXX_Recs.XXX_Row);
Db.Validate(XXX_Recs.XXX_UD_Row);
}
} /*** XXX ***/
txscope.Complete();
}
Brenda
From:
vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:20 PM
To: vantage@yahoogroups.com
Subject: [Vantage] V10 BPM Custom Code sample
I am trying to create a simple BPM using the JobHead.Update method and custom code.
I am fluent in 4GL and have done some C programming (years ago).
I am hoping someone out there may have a C# BPM Custom Code example they would be willing to share?
I'm pretty sure if I could see a sample I could expand and extrapolate for my own use.
Thanks in advance,
Dave Olender
Ph: 651-246-3281
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Nov 19, 2014 at 12:35 PM, daveolender@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p></p><p>Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.</p><p><br></p><p>Do you have maybe a simple BPM custom code that does something specific?</p><p><br></p><p>Thank you,</p><p><br></p><p>DaveO<br></p><p></p> </div> <div style="color:#fff;min-height:0;"></div>
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From:
vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
Mr. Jose: Could you give me any help finding the "Converted Programming Guide"?
I searched the answerbook (could not find it).
Is it In the downloads or education sections?
Thanks,
DaveO
Jose C Gomez
T: 904.469.1524 mobile
Quis custodiet ipsos custodes?
On Wed, Nov 19, 2014 at 4:23 PM, daveolender@... [vantage] <vantage@yahoogroups.com> wrote:Â<div> <p></p><p>Mr. Jose: Could you give me any help finding the "Converted Programming Guide"?</p><p><br></p><p>I searched the answerbook (could not find it). </p><p><br></p><p>Is it In the downloads or education sections?</p><p><br></p><p>Thanks,</p><p><br></p><p>DaveO<br></p><p></p> </div><span class="ygrps-yiv-462489901"> <div style="color:#fff;min-height:0;"></div>
Thank you Ms. Brenda,
I think even I can decipher this one.
You are the MAN! (no offense)
DaveO
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From:
vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... |
www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that
any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
I will keep this in mind.
I did not know about this. We have lots of BPMs that update tables directly so we will likely need to add the transaction scope.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:d908ee.png@a781a96b.42b84d96]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 9:33 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
I have create a few BPMs in E10 and I found you need to use the Transaction scope when updating a DB field directly and you do not need it when updating a Temp Table (ttTable). So I am using Transaction Scopes mostly on Post Process BPMs when updating the DB directly and not using them on Pre Process BPMs since I am generally updating a Temp Table which will be committed to the DB by the base method.
Here is a couple of examples
PRE PROCESS WITH A FOREACH UPDATING A ttField
foreach (var orderHed in Db.OrderHed)
{
foreach (var ttOrderDtl_iterator in (from ttOrderDtl_Row in ttOrderDtl
where (orderHed.Company == ttOrderDtl_Row.Company && orderHed.OrderNum == ttOrderDtl_Row.OrderNum)
select ttOrderDtl_Row))
{
var ttOrderDtlRow = ttOrderDtl_iterator;
ttOrderDtlRow.SalesCatID = (string)orderHed["SalesCat_c"];
}
}
POST PROCESS SELECTING THE FIRST RECORD UPDATING A DB FIELD DIRECTLY
Erp.Tables.EmpBasic EmpBasic;
using (var txscope = IceDataContext.CreateDefaultTransactionScope())
{
var EmpBasic_iterator = (from EmpBasic_Row in Db.EmpBasic.With(LockHint.UpdLock)
where (EmpBasic_Row.Company == Session.CompanyID && EmpBasic_Row.EmpID == employeeID)
select EmpBasic_Row).FirstOrDefault();
if(EmpBasic_iterator != null)
{
EmpBasic = EmpBasic_iterator;
EmpBasic["ClockedInOut_c"] = true;
Db.Validate();
}
txscope.Complete();
}
Scott
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 7:22 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks Brenda,
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]<mailto:[cid:02be9f.png@4c3cfa0e.46bea35c]>
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]<mailto:[mailto:vantage@yahoogroups.com]>
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]<mailto:[mailto:vantage@yahoogroups.com]>
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...<mailto:jrojas@...%3cmailto:jrojas@...>> | www.matsinc.com<http://www.matsinc.com<http://www.matsinc.com%3chttp:/www.matsinc.com>>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]<mailto:[cid:a6e88e.png@e5b5eb39.4cb23b37]>
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com%3cmailto:vantage@yahoogroups.com>> [mailto:vantage@yahoogroups.com]<mailto:[mailto:vantage@yahoogroups.com]>
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com%3cmailto:vantage@yahoogroups.com>>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com%3cmailto:vantage@yahoogroups.com>> [mailto:vantage@yahoogroups.com]<mailto:[mailto:vantage@yahoogroups.com]>
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com<mailto:vantage@yahoogroups.com%3cmailto:vantage@yahoogroups.com>>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 7:22 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks Brenda,
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
There is a section in the Converted Code guide titled “Using External Librariesâ€.
Is this what you are referring to?
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:1db49a.png@9d4cc13f.45a91581]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 9:58 AM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] V10 BPM Custom Code sample
FWI, I took that EUG advanced programming class. The focus was entirely on BPM’s, we mostly focused on external procedures, and it was a huge eye opener. I’m completely sold on transitioning any BPM’s that are using custom 4gl code to make all of them external procedures. They are so easy to manage and you do all your development in visual studio gaining the benefit of intellisense and having all the class references right there. I was very excited about the potential of this route.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 7:22 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks Brenda,
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Not having seen that documentation I can’t be sure. We were doing external procedures (in 9 or earlier this would have been the equivalent to using the forward to progress procedure technique). In the end what it does is creates a nice .dll file for the BO you are working in and you can then add as many method calls as you want into the same assembly (for that BO) and manage it all from one project and it’s very easy to deploy using the solution manager (yes this works for this functionality in 10).
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 9:05 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks for the feedback Rob.
There is a section in the Converted Code guide titled “Using External Librariesâ€.
Is this what you are referring to?
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:1db49a.png@9d4cc13f.45a91581]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 9:58 AM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] V10 BPM Custom Code sample
FWI, I took that EUG advanced programming class. The focus was entirely on BPM’s, we mostly focused on external procedures, and it was a huge eye opener. I’m completely sold on transitioning any BPM’s that are using custom 4gl code to make all of them external procedures. They are so easy to manage and you do all your development in visual studio gaining the benefit of intellisense and having all the class references right there. I was very excited about the potential of this route.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 7:22 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks Brenda,
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
For the ones we developed I didn’t see any performance issues, but we weren’t designing monsters in training. I can’t say for sure it would be faster or slower. Certainly easier to manage, and incredibly easier to develop because you gain the full advantage of using visual studio. It’s fully functional, not like the limitations of just using it to debug a custom UI layer.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 9:08 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Rob,
Was this for performance or ease of programming?
I have a pretty large BPM when converting a Quote to an Order and now I am wondering if I should change it to an external process.
Scott
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 8:58 AM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] V10 BPM Custom Code sample
FWI, I took that EUG advanced programming class. The focus was entirely on BPM’s, we mostly focused on external procedures, and it was a huge eye opener. I’m completely sold on transitioning any BPM’s that are using custom 4gl code to make all of them external procedures. They are so easy to manage and you do all your development in visual studio gaining the benefit of intellisense and having all the class references right there. I was very excited about the potential of this route.
Rob Bucek
Production Control Manager
PH: (715) 284-5376 ext 311
Mobile: (715)896-3119
FAX: (715)284-4084
[cid:1.234354861@...]<http://www.dsmfg.com/>
(Click the logo to view our site)<http://www.dsmfg.com/>
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 7:22 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thanks Brenda,
We are in the process of converting our BPMs right now but haven’t actually had a chance to test them to see if they work.
If I run into any issues with updates, I’ll be sure to reference your template.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:02be9f.png@4c3cfa0e.46bea35c]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, November 20, 2014 6:30 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
The small amount of documentation given during BETA included that code. I didn’t really understand it, but I could not get anything to update w/out it. All of my templates were created while working with Epicor developers during BETA.
Brenda
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 4:50 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] V10 BPM Custom Code sample
Hi Brenda,
Just out of curiosity, how did you come up with this template.
I ask because I was wondering if it was necessary to create a transaction scope.
I thought I read that the BPM is already “wrapped†in a transaction scope at a higher level.
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 37 Shuman Ave | Stoughton | Ma | 02072-3734
jrojas@...<mailto:jrojas@...> | www.matsinc.com<http://www.matsinc.com>
Ask us about our clean, green and beautiful matting and flooring
[cid:a6e88e.png@e5b5eb39.4cb23b37]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 1:01 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Here is a very simple example. No UD table included. :
Erp.Tables.Resource Resource;
using (var txscope1 = IceDataContext.CreateDefaultTransactionScope())
{
var Resource_Recs = (from Resource_Row in Db.Resource
where Resource_Row.Company == Session.CompanyID
&& Resource_Row.ResourceID == callContextBpmData.ShortChar01
select new {Resource_Row}).FirstOrDefault();
{
if (Resource_Recs != null)
{
Resource_Recs.Resource_Row.Inactive = true;
Db.Validate(Resource_Recs.Resource_Row);
}
}
txscope1.Complete();
}
Brenda
From: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com> [mailto:vantage@yahoogroups.com]
Sent: Wednesday, November 19, 2014 12:36 PM
To: vantage@yahoogroups.com<mailto:vantage@yahoogroups.com>
Subject: RE: [Vantage] V10 BPM Custom Code sample
Thank you Ms. Brenda - I'll admit this is code is foreign to me - I will look at it closely.
Do you have maybe a simple BPM custom code that does something specific?
Thank you,
DaveO
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]