SOLVED

parameter required with getMObjects

Go to solution
Anonymous
Not applicable

parameter required with getMObjects

We are noticing that we are getting an internal error response when calling getMObjects on the API.  When we only specify the type attribute (e.g. to Opportunity) on ParamsGetMObjects, we receive a response that says "Parameter required" - but according to the schema and the docs it's optional. When we set the ID field, it works, but we don't want to retrieve a specific object - we want a list of objects.

Any ideas?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: parameter required with getMObjects

Try using a name/value comparison that would result in all opportunities (i.e. Name does not equal 'XXXX')

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Re: parameter required with getMObjects

GetMObjects is used to return specific MObject records.  You can retrieve specific records by specifying the MObject Type and the following optional params (MObject ID, ExternalKey, Criterial List).
Anonymous
Not applicable

Re: parameter required with getMObjects

Right, so I'm trying to essentially query all the objects (e.g. all opportunities). 

Documentation says this:

Retrieves one or more MObjects using a combination of criteria consisting of:
Zero or one unique ID, either the Marketo ID or external ID
Zero or more attribute filters as name/value/comparison trios
Zero or more associated object filters as object name/ID pairs
 
Which I take to mean that all the parmaeters EXCEPT for Type are optional. Is this not the case? I've also tried specifying a single attribute filter, but I still get parameter required message.

Anonymous
Not applicable

Re: parameter required with getMObjects

Try using a name/value comparison that would result in all opportunities (i.e. Name does not equal 'XXXX')
Anonymous
Not applicable

Re: parameter required with getMObjects

Thank you, that worked. Can you please fix your documentation or API?