You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy extension for Order Type Transaction Type

edited Apr 12, 2021 11:52AM in Order Management 6 comments

Content

import oracle.apps.scm.doo.common.extensions.ValidationException;
import oracle.apps.scm.doo.common.extensions.Message;
def extensionName = context.getExtensionName();
def varMessage = "IN code";
List<Message> messages = new ArrayList<Message>();
ValidationException ex = new ValidationException(messages);
def varTime = context.getCurrentTime();
def orderTypeCode = header.getAttribute("TransactionTypeCode");
def LineTypeCode = line.getAttribute("TransactionLineTypeCode");
def billingTxnTypeId ;
if( orderTypeCode.equals("RENTAL_ORDER") && LineTypeCode.equals("ORA_BUY") ) { // check for ordertype
billingTxnTypeId = getBillingTxnTypeId("OM Invoices");
}
else if ( orderTypeCode.equals("IS_RMA") ) {
billingTxnTypeId = getBillingTxnTypeId("Credit Memo");
}
if (billingTxnTypeId == null){
varMessage = "Billing Transaction Type has not Been Set for Order Type: - " + orderTypeCode;
messages.add(new Message( Message.MessageType.ERROR,varMessage));

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!