but glad you figured it out
On Wed, Oct 30, 2013 at 4:50 PM, <ralmon@...> wrote:Â<div> <p></p><p>I know I can use BPM Emails but I'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.
Â
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.
Â
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...
---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 GomezSoftware Engineer
Â
T: 904.469.1524 mobile</div> <div style="color:#fff;min-height:0;"></div>