Need help to make Return Reason field as mandatory field through OM extension
Need help to make Return Reason field as mandatory field through OM extension
have used the below code, but it did not work
import oracle.apps.scm.doo.common.extensions.Message;
import oracle.apps.scm.doo.common.extensions.ValidationException;
def lines = header.getAttribute("Lines")
while(lines.hasNext() )
{
def line = lines.next()
if (line.getAttribute("ReturnReasonCode") == null &&
(LineCategory == "RETURN")
)
{
def token = [LINE_NUM: line.getAttribute("DisplayLineNumber")];
String msgtext = ("Return Reason is Mandatory")
Message msg = new Message(Message.MessageType.ERROR, msgtext);
throw new ValidationException(msg);
}
}
Regards
0