We booked, shipped and invoiced a sales order with a valid part number. It wreaked some havoc. Is there a setting in Company Configuration that would require a valid part number in sales order entry?
there is not. Epicor will allow you to add a part on the fly in the sales
order, make it direct or purchase it direct to the order, ship it and
invoice it
If you do not want that to happen you will have to write a simple BPM when
the part is not part of your part master to pop up a notice to the user and
not allow them to enter the order line until a valid part number is entered
// check if they are adding a line
foreach (var ttOrderDtl_iterator in (from ttOrderDtl_Row in ttOrderDtl
where string.Equals(ttOrderDtl_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase)
|| string.Equals(ttOrderDtl_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase)
select ttOrderDtl_Row))
{
var ttOrderDtlRow = ttOrderDtl_iterator;
PartRev = (from PartRev_Row in Db.PartRev
where string.Compare(ttOrderDtlRow.Company, PartRev_Row.Company, true) == 0
&& string.Compare(ttOrderDtlRow.PartNum, PartRev_Row.PartNum, true) == 0
&& string.Compare(ttOrderDtlRow.RevisionNum,PartRev_Row.RevisionNum, true) == 0
select PartRev_Row).FirstOrDefault();
if (PartRev == null)
{
CallContext.Current.ExceptionManager.AddBLException("Error: The part number and revision does not exist.");
}
I tried the code and I get a CS0103 The name ttOrderDtl does not exist in the current context.
I will try to debug it, but if I could get pointers on what to fix to make it work I would appreciate it.
Thank you!
thank you
Seems I have to use Db in our coding. I will debug trying to compare what was coded for other methods. At least the code provided in this thread will get me started.