Cannot get custom objects from SOAP API


Cannot get custom objects from SOAP API


I'm trying to get custom objects using the SOAP API but the call fails with this error:

<ns1:serviceException xmlns:ns1=""><name>mktValidationException</name><message>Unknown name key list: serviceName</message><code>10001</code></ns1:serviceException>

I have tested with several fields and double checked the spelling.

The code I'm using is this:

var parameters = new ParamsGetCustomObjects();
parameters.objTypeName = "<name of custom object, spelling is correct>";
parameters.batchSize = 100;
parameters.batchSizeSpecified = true;
parameters.customObjKeyList = new[]
new Attribute
attrName = "userEmail",
attrValue = request.UserEmail,
attrType = "string"

parameters.includeAttributes = new[]

var result = client.getCustomObjects(parameters);

I can for example get leads so the api and credentials are working.
What am I missing?


Level 10 - Community Moderator

Re: Cannot get custom objects from SOAP API

Can you please 

1. Highlight any code using the Syntax Highlighter so it's readable.

2. Provide the actual XML payload you're putting on the wire. Code in one arbitrary language isn't really helpful, it must put the correct data in motion regardless of language or HTTP framework.