Good morning experts! I’m hoping someone can help with this, it seems like it should be simple but I can’t get it to work. I am customizing the Customer Shipment Entry form because we mostly ship our product to an installer, who then delivers it to the site for installation. For this reason I have changed the existing “Ship To” group to “Site” and created a new ship to area to show either the installer’s address or the site address. I’ve got the code worked out to show the installer address if the product ships to installer, but can’t get it to show the site address if it ships directly to the site.
I’ve got the code in the “oTrans_adapter_AfterAdapterMethod” event, under “POGetDtlList”, which is the last thing triggered before the data shows on the form.
Here’s the code I’m using to test the adapter connection…
SalesOrderAdapter adOrd = new SalesOrderAdapter(oTrans);
adOrd.BOConnect();
adOrd.GetByID(orderNum);
ShipToAdapter adShipTo = new ShipToAdapter(oTrans);
adShipTo.BOConnect();
adShipTo.GetByID(adOrd.SalesOrderData.Tables[“OrderHed”].Rows[0][“ShipToCustNum”].ToString());
It would be nice if I could simply say the Ship To TextBox.Text equals the Site TextBox.Text, but since the data loads after the “POGetDtlList”, that only results in a blank TextBox.
Thanks for your time and for any help you can provide! Have a great day!
Thank you Jaicker_Avila! Once again, you save me. It didn’t even occur to me that it took two values in the GetByID method. That’s one thing I miss about using Visual Studio, it would give you hints to what was required.
I think the adapter may be the wrong choice. The Customer adapter is likely the one to use it has a method. GetShipTo(custID, shipToNum) the ShipTo adapter doesn’t have a method that accepts customer number and a shipto
Object explorer shows what methods and properties are available on an adapter