I will start this post that by saying I am a beginner when it comes to both C# and Epicor. Getting help on this question would help connect a lot of dots for me when it comes to both.
What is the best way to access data in custom code from, in this case, PartPlant_UD.Character04 from Sales Order Method OrderDtl_BeforeFieldChange?
Here is my code:
private static void OrderDtl_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
{
// ** Argument Properties and Uses **
// args.Row[“FieldName”]
// args.Column, args.ProposedValue, args.Row
// Add Event Handler Code
switch (args.Column.ColumnName)
{
case "PartNum":
//Dataset
PartPlantSearchAdapter ppAdapt = new PartPlantSearchAdapter(oTrans);
ppAdapt.BOConnect();
EpiDataView myEdv = (EpiDataView) oTrans.EpiDataViews["OrderDtl"];
PartPlantSearchDataSet ppDataSet = new PartPlantSearchDataSet();
ppDataSet = (PartPlantSearchDataSet)(ppAdapt.GetData(args.ProposedValue.ToString()));
ppDataSet.Tables[0].Rows[0]["PartNum"].ToString();
//HOW TO GET CHARACTER04 FROM PartPlant_UD BASED ON PartNum????
Am I headed in the right direction? I have attempted to manipulate ppDataSet to get Character04 (code not shown), to no avail. My code compiles and I think I have the right assembly references. Should I cast it to a PartPlantSearchDataSet, or just use a normal DataSet? What methods/properties do I used to access the data if I used either of these? Should I be using a BAQ instead? So many questions, a nudge in the right direction would be huge.
Thanks in advance.
Blake Martin