Cannot get custom objects from SOAP API | Community
Skip to main content
Rickard_Lindgre
Level 1
November 28, 2019
Question

Cannot get custom objects from SOAP API

  • November 28, 2019
  • 1 reply
  • 1296 views

Hi,

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

<ns1:serviceException xmlns:ns1="http://www.marketo.com/mktows/"><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[]
{
"userEmail",
"serviceName"
};

var result = client.getCustomObjects(parameters);


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

Thanks,
Rickard

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
November 28, 2019

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.