Trying to follow Example. Cannot add code in a query designer

Shipping more than line - ERP 10 - Epicor User Help Forum (epiusers.help)

My organization would like to implement similar functionality. I see that it is a fairly through breakdown but once I add the selected condition and click to design the query, I am met with a BAQ screen and no possible way of adding the provided code. (That I can See). Any insight into this would be greatly appreciated. I was thinking I could just use Custom Code to achieve the same thing, but this threw me off and I would like to verify there is not a way to use code in the query designer.

That example is all custom code widget.

Yes, your entries on that thread were all examples of the custom Code Widget. However, in Dora’s step by step guide Step 12 She opens the Query Designer and Step 13 she adds code to it. Which, from my experience is not possible. Can you confirm? Is there a way to tie that condition to a code widget that would look at that as the designed query? (I don’t believe so) No harm in asking.

Think Dora’s example was for Epicor 9. I could be wrong though.

Ahh, fair enough. Thanks for the information.

Create a Method Directive on CustShip.Update
Add the Custom Code widget
Paste this code in:

var ShipDtl = ds.ShipDtl.Where(sd => (sd.Added() ||sd.Updated()) && ((sd.OurJobShipQty + sd.OurInventoryShipQty) > (sd.SellingReqQty - sd.SellingShippedQty))).FirstOrDefault();

if(ShipDtl != null)
{

  var message = "You are attempting to overship this line, please correct before you can continue."; 
        throw new Ice.Common.BusinessObjectException(new Ice.Common.BusinessObjectMessage(message){Type =Ice.Common.BusinessObjectMessageType.Error,});

}

1 Like