I have a client tool customization that does work connecting drop ship SO’s to PO’s. It sometimes updates the supplier on the SO. When a customer is on credit hold it will present that message on the screen during every iteration when it opens the SO dataset.
I saw this post but it applies to a BPM.
Disable Credit Hold Message - Epicor User Help Forum (epiusers.help)
How do I go about clearing out the cCreditLimitMessage argument in client code in the commented example below?
private void updateSOSupplier(int orderNum, int orderLine, int orderRelNum, int vendorNum, bool update)
{
bool morePages = false;
SalesOrderAdapter adpSalesOrder = new SalesOrderAdapter(oTrans);
adpSalesOrder.BOConnect();
string wc = string.Format("OrderNum={0}", orderNum);
string wc2 = string.Format("OrderLine={0} AND OrderRelNum = {1}", orderLine, orderRelNum);
System.Collections.Hashtable wcs = new Hashtable(1);
wcs.Add("OrderHed", wc);
wcs.Add("OrderRel", wc2);
Ice.Lib.Searches.SearchOptions searchOpts = Ice.Lib.Searches.SearchOptions.CreateRuntimeSearch(wcs, Ice.Lib.Searches.DataSetMode.RowsDataSet);
//string custID = "10000";
//string cAgingMessage = "";
//bool lCustomerAllowed = false;
//adpSalesOrder.CheckCustOnCreditHold(orderNum, custID, out cAgingMessage, out lCustomerAllowed);
adpSalesOrder.InvokeSearch(searchOpts);
if(adpSalesOrder.SalesOrderData.Tables["OrderRel"].Rows.Count > 0)
{
if(update == true)
{
adpSalesOrder.SalesOrderData.OrderRel[0]["VendorNum"] = vendorNum;
adpSalesOrder.Update();
logSB.AppendLine("Updated Supplier on SO Release:" +cm+cm+cm+cm+cm+cm+ orderNum.ToString() +cm+cm+cm+ getVendorID(vendorNum));
}
}
else
{
MessageBox.Show("SO Release " + orderNum.ToString() + "/" + orderLine.ToString() + "/" + orderRelNum.ToString() + " does not exist.");
}
adpSalesOrder.Dispose();
}
I am just looking to bypass the credit hold message in the client code as it iterates through the grid. Or is it easier to just write something to a BPM context field during the iteration and use that as a condition to trigger the BPM approach?
Thanks for any ideas,
Ross