Sorry, newbie here…
We just started using REST API Calls to create Sales Orders from our site. Everything is working except when a particular call triggers a BPM exception.
This is the BPM code we have:
foreach(var orderDtlRow in ttOrderDtl.Where(od => (od.RowMod == IceRow.ROWSTATE_ADDED || od.RowMod == IceRow.ROWSTATE_UPDATED)))
{
var part = Db.Part.Where(p => (p.Company == orderDtlRow.Company && p.PartNum == orderDtlRow.PartNum)).FirstOrDefault();
if(part == null)
{
if(orderDtlRow.PartNum.Substring(0,2).ToUpper() != "ER" & orderDtlRow.PartNum.Substring(0,2).ToUpper() != "IR")
{
CallContext.Current.ExceptionManager.AddBLException("Invalid Part Number");
}
}
else if(part.InActive == true)
{
CallContext.Current.ExceptionManager.AddBLException("Inactive Part Number.");
}
else if(part.DoNotSell_c == true)
{
CallContext.Current.ExceptionManager.AddBLException("Part Cannot Be Sold.");
}
}
When we use an Inactive part in Postman, it would only show “Sorry! Something went wrong. Please contact your system administrator”. How can we get it to say how it shows when entering in Epicor?
Thank you.