hi chetan i have a bussiness need to create a custom form from application composer and to hit direct to the work orders so i created a custom object but i cannot link it with the rest api i have url link to create work orders but i don't know where to paste them so do you have anything that could help me thanks in advance
Hi, You can write groovy script at triggering event or button click events to call your webservice. Below is the reference script. but you can take as reference and try to modify with your requirement.
if(EBSSalesOrderNumber_c==null) throw new oracle.jbo.ValidationException('Sales Order not generated in EBS. Kindly Retrigger the sales order creation from the actions')
if(OrderStatus_SO_c=="Reserved") { def SOAHeader=[Responsibility:'',RespApplication:'',SecurityGroup:'',NLSLanguage:'',Org_Id:'',] def body =[ X_SO_NUMBER :Id,] println("Initiate Approval Body:"+body) def resp = adf.webServices.WebService_EBS.INITIATE_WF_APPROVAL(SOAHeader, body) println("Initiate Approval Response:"+resp) def ret_status = resp.X_RETURN_STATUS def msg_data = resp.X_MSG_DATA setAttribute("IntegrationStatus_c",msg_data) } else throw new oracle.jbo.ValidationException('Please check the status of the Order.Approval can be intiated only for Sales Order with status as Reserved.')
hi chetan i have a bussiness need to create a custom form from application composer and to hit direct to the work orders so i created a custom object but i cannot link it with the rest api i have url link to create work orders but i don't know where to paste them so do you have anything that could help me thanks in advance
ReplyDeleteHi, You can write groovy script at triggering event or button click events to call your webservice. Below is the reference script. but you can take as reference and try to modify with your requirement.
Deleteif(EBSSalesOrderNumber_c==null)
throw new oracle.jbo.ValidationException('Sales Order not generated in EBS. Kindly Retrigger the sales order creation from the actions')
if(OrderStatus_SO_c=="Reserved")
{
def SOAHeader=[Responsibility:'',RespApplication:'',SecurityGroup:'',NLSLanguage:'',Org_Id:'',]
def body =[ X_SO_NUMBER :Id,]
println("Initiate Approval Body:"+body)
def resp = adf.webServices.WebService_EBS.INITIATE_WF_APPROVAL(SOAHeader, body)
println("Initiate Approval Response:"+resp)
def ret_status = resp.X_RETURN_STATUS
def msg_data = resp.X_MSG_DATA
setAttribute("IntegrationStatus_c",msg_data)
}
else throw new oracle.jbo.ValidationException('Please check the status of the Order.Approval can be intiated only for Sales Order with status as Reserved.')