My Oracle Support Banner

Rest API Batch Process For Opportunity error when using conditionally required field (Doc ID 2593853.1)

Last updated on OCTOBER 07, 2019

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.13.19.01.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.13.19.01.0 version, Opportunities

Rest API Batch Process For Opportunity error when using conditionally required field

Rest API call to create single opportunity record works fine

URL Used: https://xxxxxxx.oracleoutsourcing.com/crmRestApi/resources/11.13.18.05/opportunities/
Headers: Content-Type / application/json
Payload Used
{
"Name": "Test_SC_03122019_1",
"LeasingRegion_c":"Ontario",
"Property_Id_c": 300000008795033
}



However, the Batch payload to create opportunity record throws validation error.

URL Used: https://xxxxxx.oracleoutsourcing.com/salesApi/resources/11.13.18.05
Headers: Content-Type / application/vnd.oracle.adf.batch+json
Payload Used
{
  "parts": [{
  "id": "part1",
  "path": "/opportunities",
  "operation": "create",
  "payload": {
  "Name": "apitest99",
  "LeasingRegion_c":"Ontario",
  "Property_Id_c": 300000008795033
  }
  }]
}


There is groovy on the LeasingRegion_c field which is basically to make it conditionally required.


ERROR
-----------------------
 
Exception in expression "OpportunityEO.LeasingRegion_c" property expression "mandatory" : groovy.lang.MissingMethodException :
No signature of method: Opportunity.getPrimaryRowState() is applicable for argument types: () values: []
  

at "OpportunityEO.LeasingRegion_c" property "mandatory" line 1
  

  

  




STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Invoke REST Batch API call to create Opportunity.
2. Receiving an error.


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.