My Oracle Support Banner

Calling REST API With DynamicQueryParams Is Throwing 400 Bad Request (Doc ID 2310459.1)

Last updated on SEPTEMBER 24, 2017

Applies to:

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


On : version, CX Integration

Calling REST API with dynamicQueryParams Is Throwing 400 Bad Request

Trying to execute this code
def conn =adf.webServices.Contact_Query;
def emailCollection = Email;
def mail
def httpHeaders=['Content-Type':'application/']
httpHeaders = httpHeaders + ['Accept-Language':'es-ES'];

def emailRec =;
mail = emailRec.EmailAddress;
println("PreferredContactMail: "+PreferredContactEmail);
println("E-Mail: "+mail);
def queryParams = ['finder':'PrimaryKey;emails.address=""']
conn.dynamicQueryParams = queryParams

def contacts = conn.GET();

if (contacts==null)
throw new oracle.jbo.ValidationException("No contacts found")
return false;
def output = contacts.items?.first().lookupName;
println("PartyId of the New contact is: " + output )

return true;

}catch(Exception e){
throw new oracle.jbo.ValidationException("Error:"+e)

Error:oracle.binding.expr.ServiceInvocationException: JBO-29000: Unexpected exception caught:, msg=JBO-57001: Invocation of service URL used in connection failed with status code 400 Bad Request.

The issue can be reproduced at will with the following steps:
1. Login to Sales Cloud
2. Navigate to Contacts tile
3. Click Create Contact
4. Fill in the details -> Save and Close
5. Getting an error

The issue has the following business impact:
Due to this issue, users cannot Save Contacts


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

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

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