Need Groovy script to avoid duplicate PO number within a Business unit
Summary:
The requirement is to display a message if there is a duplicate Customer PO number is Entered within a Business unit.It is ok if the same PO exist in different Business unit.
I used the below groovy from an Oracle doc that restrict Across BU, how to modify the code to restrict within a BU.
++++
import oracle.apps.scm.doo.common.extensions.ValidationException;
String customerPONumber = header.getAttribute("CustomerPONumber");
String OrderNumber = header.getAttribute("OrderNumber");
if (customerPONumber == null || customerPONumber.trim().isEmpty() )
{
throw new ValidationException("Enter the PO number");
}
def vo = context.getViewObject("oracle.apps.scm.doo.processOrder.publicModel.partyMerge.view.HeaderPVO");
Tagged:
0