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

Not able to create a sales cloud lead from oracle service cloud

Received Response
6
Views
1
Comments
edited Feb 6, 2017 10:49AM in UI Extensibility 1 comment

Content

Hi,

We couldn't create the lead from service cloud to sale cloud. We are getting the error message as below;

"oracle.adf.internal.model.rest.core.exception.CannotParseContentException: 
The content type is not a ADFm REST entity. Content-Type: text/xml"

The code block is,

public void CreateContact()
        {
            String input = "{ \"Name\": \"ffff\" }";

            var request = new RestRequest(Method.POST)
            {
                Resource = string.Format("leads")
            };

            //string json = JsonConvert.SerializeObject(input);
            request.JsonSerializer.ContentType = "application/json; charset=UTF-32;";
            request.AddHeader("Content-Type", "application/json; charset=UTF-32;");
            request.AddBody(input);

            var response = _client.Execute(request);
        }

Thanks,

Sriranjjani

 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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