Thank you for the comment. I’ve added that to my code.
It is not getting the data from the orderdtl table so i can pull it into the jobhead table. Can I not call OrdDtil from the job entry form? If not, how can i get that data into the jobhead table/
The data i want to pull into the JobProd table is from a UD field on the OrdDtl_UD table.
On sales order entry the salesperson can enter a number into a UD text field, that data needs to be shown on the matching job created from that sales order. So I am trying to pull that data from OrdDtl if the job matches the sales order and display it in a UD text field on the job.
You’ll need to call the adapter and pass in the order number.
private void CallSalesOrderAdapterGetByIDMethod(int intId)
{
try
{
// Declare and Initialize EpiDataView Variables
// Declare and create an instance of the Adapter.
SalesOrderAdapter adapterSalesOrder = new SalesOrderAdapter(this.oTrans);
adapterSalesOrder.BOConnect();
// Declare and Initialize Variables
// TODO: You may need to replace the default initialization with valid values as required for the BL method call.
// Call Adapter method
bool result = adapterSalesOrder.GetByID(intId);
MessageBox.Show(adapterSalesOrder.SalesOrderData.OrderHed[0]["ShipViaCode"].ToString());
// Cleanup Adapter Reference
adapterSalesOrder.Dispose();
} catch (System.Exception ex)
{
ExceptionBox.Show(ex);
}
}