C# access to data

Confucius said don't use a hammer to kill a mosquito  :-)

but glad you figured it out




Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

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

Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 4:50 PM, <ralmon@...> wrote:

Â
<div>
  
  
  <p></p><p>I know I can use BPM Emails but I&#39;m trying to learn how to interact with Epicor data through C# objects.</p><p><br></p><p style="font-style:normal;font-size:13px;background-color:transparent;font-family:arial, helvetica, clean, sans-serif;">

I've figured out how to use the Business Objects well enough on my own though, so that should be enough for me.


For anyone else trying to figure that out:


Add the correct assembly. Epicor.Mfg.BO.PO;


PO my_po = new PO(((Session)oTrans.Session).ConnectionPool);

DataSet pods = my_po.GetByID(1006);

Int32 po_number = pods.Tables["POHeader"].Rows[0]["PONum"]; // how you can access the values


And to see a list of values you can

pods.WriteXml("C:\\pods.xml"); // to see the xml dump


Â



—In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

If you want it triggered with a button what I have done in the past that works well is designated a checkbox for my flag and processed the on_click like this

1.      Set via dataview the designated checkbox field to true

2.      Perform a epi notify

3.      Otrans update

a.      At this point your BPM would have actions on checkboxXX false to true

b.     If you can make sure the BPM is async that sends your email

c.      A BAM could be used with this method as well if you like.

4.      Set via dataview the designated checkbox field to false

5.      Perform a epi notify

6.      Otrans update

Â

It’s not the prettiest, but it hasn’t failed me. Depending on the screen you do this in the processing time can take a while. So take this with a grain of salt.

Â

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez

Sent: Wednesday, October 30, 2013 2:54 PM
To: Vantage
Subject: Re: RE: RE: Re: [Vantage] C# access to data

Â

Â

The easiet way to do this is with a BPM Email, so add a Checkbox something like ChekcBox01 to your PH and when that Box Is checked and saved simply trigger a BPM email on Update that will fire the email with what you want.



Jose C Gomez

Software Engineer

Â


T: 904.469.1524 mobile

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

     Â


Quis custodiet ipsos custodes?

Â

On Wed, Oct 30, 2013 at 3:32 PM, <ralmon@...> wrote:

Â

 Yeah I'm in a customization on a button click and I know the PO Number from the textfield. I want to query Epicor for the full PO dataset for the po number and send an e-mail to the PO vendor email address with a message containing all the po line items.

Â

I just dont know how to get at the data.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

To send a e-mail,  I think you'll have to go through bam and just make the button trigger something....  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor....  I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form.Â

Â

What objects are available on the Script class of the customization?

Â

I'm looking for a short explanation of like:

Â

POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());

Â

MessageBOx.Show(ds.POHeader.PONum);

Â

That sort of thing...

Â

</div>
 


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

I'm having trouble finding documentation and examples for epicor C# customizations.

How would I get a DataSet with all of the info for Purchase Order 10067?

If someone could walk me through accessing data like that it would be most helpful.

Thanks.
Accessing the dataset with all the info for PO... on what? A customization? if so which customization? what are you using to call it?
Yoiu may want to start reading the basics User Experice and Customization books available at EpicWeb


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@…

http://www.josecgomez.com
     Â


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 2:42 PM, <ralmon@...> wrote:

Â
<div>
  
  
  <p>I&#39;m having trouble finding documentation and examples for epicor C# customizations.</p><div><br></div><div>How would I get a DataSet with all of the info for Purchase Order 10067?</div><div><br></div><div>If someone could walk me through accessing data like that it would be most helpful.</div>

Thanks.

</div>
 


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

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form. 


What objects are available on the Script class of the customization?


I'm looking for a short explanation of like:


POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());


MessageBOx.Show(ds.POHeader.PONum);


That sort of thing...



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

Accessing the dataset with all the info for PO... on what? A customization? if so which customization? what are you using to call it?
Yoiu may want to start reading the basics User Experice and Customization books available at EpicWeb


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 2:42 PM, <ralmon@...> wrote:

 
<div>
  
  
  <p>I&#39;m having trouble finding documentation and examples for epicor C# customizations.</p><div><br></div><div>How would I get a DataSet with all of the info for Purchase Order 10067?</div><div><br></div><div>If someone could walk me through accessing data like that it would be most helpful.</div>

Thanks.
</div>
 


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

To send a e-mail,  I think you'll have to go through bam and just make the button trigger something....  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor....   I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form. 


What objects are available on the Script class of the customization?


I'm looking for a short explanation of like:


POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());


MessageBOx.Show(ds.POHeader.PONum);


That sort of thing...



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

Accessing the dataset with all the info for PO... on what? A customization? if so which customization? what are you using to call it?
Yoiu may want to start reading the basics User Experice and Customization books available at EpicWeb


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 2:42 PM, <ralmon@...> wrote:

 
<div>
  
  
  <p>I&#39;m having trouble finding documentation and examples for epicor C# customizations.</p><div><br></div><div>How would I get a DataSet with all of the info for Purchase Order 10067?</div><div><br></div><div>If someone could walk me through accessing data like that it would be most helpful.</div>

Thanks.
</div>
 


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

 Yeah I'm in a customization on a button click and I know the PO Number from the textfield. I want to query Epicor for the full PO dataset for the po number and send an e-mail to the PO vendor email address with a message containing all the po line items.


I just dont know how to get at the data.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

To send a e-mail,  I think you'll have to go through bam and just make the button trigger something....  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor....   I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form. 


What objects are available on the Script class of the customization?


I'm looking for a short explanation of like:


POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());


MessageBOx.Show(ds.POHeader.PONum);


That sort of thing...



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

Accessing the dataset with all the info for PO... on what? A customization? if so which customization? what are you using to call it?
Yoiu may want to start reading the basics User Experice and Customization books available at EpicWeb


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 2:42 PM, <ralmon@...> wrote:

 
<div>
  
  
  <p>I&#39;m having trouble finding documentation and examples for epicor C# customizations.</p><div><br></div><div>How would I get a DataSet with all of the info for Purchase Order 10067?</div><div><br></div><div>If someone could walk me through accessing data like that it would be most helpful.</div>

Thanks.
</div>
 


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

The easiet way to do this is with a BPM Email, so add a Checkbox something like ChekcBox01 to your PH and when that Box Is checked and saved simply trigger a BPM email on Update that will fire the email with what you want.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 3:32 PM, <ralmon@...> wrote:

Â
<div>
  
  
  <p></p><p>Â Yeah I&#39;m in a customization on a button click and I know the PO Number from the textfield. I want to query Epicor for the full PO dataset for the po number and send an e-mail to the PO vendor email address with a message containing all the po line items.</p>


I just dont know how to get at the data.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:


To send a e-mail,  I think you'll have to go through bam and just make the button trigger something…  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor…  I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form.Â


What objects are available on the Script class of the customization?


I'm looking for a short explanation of like:


POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());


MessageBOx.Show(ds.POHeader.PONum);


That sort of thing…



—In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:


Accessing the dataset with all the info for PO… on what? A customization? if so which customization? what are you using to call it?

Yoiu may want to start reading the basics User Experice and Customization books available at EpicWeb


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

E: jose@...

http://www.josecgomez.com
     Â


Quis custodiet ipsos custodes?


On Wed, Oct 30, 2013 at 2:42 PM, <ralmon@...> wrote:

Â
<div>
  
  
  <p>I&#39;m having trouble finding documentation and examples for epicor C# customizations.</p><div><br></div><div>How would I get a DataSet with all of the info for Purchase Order 10067?</div><div><br></div><div>If someone could walk me through accessing data like that it would be most helpful.</div>

Thanks.
</div>
 


<div style="color:#fff;"></div>

</div>
 


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

If you want it triggered with a button what I have done in the past that works well is designated a checkbox for my flag and processed the on_click like this

1.       Set via dataview the designated checkbox field to true

2.       Perform a epi notify

3.       Otrans update

a.       At this point your BPM would have actions on checkboxXX false to true

b.      If you can make sure the BPM is async that sends your email

c.       A BAM could be used with this method as well if you like.

4.       Set via dataview the designated checkbox field to false

5.       Perform a epi notify

6.       Otrans update

 

It’s not the prettiest, but it hasn’t failed me. Depending on the screen you do this in the processing time can take a while. So take this with a grain of salt.

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Wednesday, October 30, 2013 2:54 PM
To: Vantage
Subject: Re: RE: RE: Re: [Vantage] C# access to data

 

 

The easiet way to do this is with a BPM Email, so add a Checkbox something like ChekcBox01 to your PH and when that Box Is checked and saved simply trigger a BPM email on Update that will fire the email with what you want.



Jose C Gomez

Software Engineer

 


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Wed, Oct 30, 2013 at 3:32 PM, <ralmon@...> wrote:

 

 Yeah I'm in a customization on a button click and I know the PO Number from the textfield. I want to query Epicor for the full PO dataset for the po number and send an e-mail to the PO vendor email address with a message containing all the po line items.

 

I just dont know how to get at the data.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

To send a e-mail,  I think you'll have to go through bam and just make the button trigger something....  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor....   I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form. 

 

What objects are available on the Script class of the customization?

 

I'm looking for a short explanation of like:

 

POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());

 

MessageBOx.Show(ds.POHeader.PONum);

 

That sort of thing...

 

I know I can use BPM Emails but I'm trying to learn how to interact with Epicor data through C# objects.


I've figured out how to use the Business Objects well enough on my own though, so that should be enough for me.


For anyone else trying to figure that out:


Add the correct assembly. Epicor.Mfg.BO.PO;


PO my_po = new PO(((Session)oTrans.Session).ConnectionPool);

DataSet pods = my_po.GetByID(1006);

Int32 po_number = pods.Tables["POHeader"].Rows[0]["PONum"]; // how you can access the values


And to see a list of values you can

pods.WriteXml("C:\\pods.xml"); // to see the xml dump


 



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

If you want it triggered with a button what I have done in the past that works well is designated a checkbox for my flag and processed the on_click like this

1.       Set via dataview the designated checkbox field to true

2.       Perform a epi notify

3.       Otrans update

a.       At this point your BPM would have actions on checkboxXX false to true

b.      If you can make sure the BPM is async that sends your email

c.       A BAM could be used with this method as well if you like.

4.       Set via dataview the designated checkbox field to false

5.       Perform a epi notify

6.       Otrans update

 

It’s not the prettiest, but it hasn’t failed me. Depending on the screen you do this in the processing time can take a while. So take this with a grain of salt.

 

Joshua Giese

CIO

920.437.6400 Ext. 337

Site ID: 27450-E905700B2-SQL64

Wisconsin Converting, Inc.

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Jose Gomez
Sent: Wednesday, October 30, 2013 2:54 PM
To: Vantage
Subject: Re: RE: RE: Re: [Vantage] C# access to data

 

 

The easiet way to do this is with a BPM Email, so add a Checkbox something like ChekcBox01 to your PH and when that Box Is checked and saved simply trigger a BPM email on Update that will fire the email with what you want.



Jose C Gomez

Software Engineer

 


T: 904.469.1524 mobile


Quis custodiet ipsos custodes?

 

On Wed, Oct 30, 2013 at 3:32 PM, <ralmon@...> wrote:

 

 Yeah I'm in a customization on a button click and I know the PO Number from the textfield. I want to query Epicor for the full PO dataset for the po number and send an e-mail to the PO vendor email address with a message containing all the po line items.

 

I just dont know how to get at the data.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

To send a e-mail,  I think you'll have to go through bam and just make the button trigger something....  The concepts you,re talking about like POform() are to create popup  for a baq report printing option.  The GetByID go and fetch the information about a row, often we use it to go and find some information in another table than the one you're currently on.  The DataSetds = new DataSet is just to create a variable named dataset in which you put information to construct your own dataset to call business object of epicor....   I don't think it's what you wanna do.



---In vantage@yahoogroups.com, <vantage@yahoogroups.com> wrote:

 Yeah, setting up a customization that just e-mails me some PO information when you press a button on the PO entry form. 

 

What objects are available on the Script class of the customization?

 

I'm looking for a short explanation of like:

 

POForm form = new POForm();

form.GetByID(1002);

DataSet ds = new DataSet();

ds.fill(form.GetDataSet());

 

MessageBOx.Show(ds.POHeader.PONum);

 

That sort of thing...