Happy Business Starts Here

Zuora Alumni

Describe shows field is available but field is Invalid when executing query

Describe shows fields are available

 

https://apisandbox.zuora.com/apps/api/describe/{object}

But when executing the ZOQL query the error states there are invalid fields

 

 

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

3 REPLIES 3
Zuora Alumni

Re: Describe shows field is available but field is Invalid when executing query

Make sure the WSDL versions match.

 

When calling describe, include the same WSDL version as the calling query

 

/apps/api/85/describe/RatePlanCharge


If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Zuora Documentation

Re: Describe shows field is available but field is Invalid when executing query

As of WSDL 85, some fields returned by Describe can't be referenced in Export ZOQL queries.

 

For each field, the <contexts> element tells you whether the field can be referenced in Export ZOQL queries. Only fields that have <context>export</context> be referenced in Export ZOQL queries.

 

For example, in the response for /apps/api/85/describe/RatePlanCharge you'll see:

 

...
<field> <name>RolloverBalance</name> <label>RolloverBalance</label> ... <type>Decimal</type> <contexts> <context>soap</context> </contexts> </field> <field> <name>Segment</name> <label>Segment</label> ... <type>integer</type> <contexts> <context>soap</context> <context>export</context> </contexts> </field>
...

 

The RolloverBalance field doesn't have the export context, so can't be referenced in Export ZOQL queries. The Segment field does have the export context, so can be referenced in Export ZOQL queries.

 

Check out this Knowledge Center article for more info:

https://knowledgecenter.zuora.com/DC_Developers/M_Export_ZOQL/Changes_to_the_Describe_API

Highlighted
Zuora Alumni

Re: Describe shows field is available but field is Invalid when executing query

Hi @DavidW  Thank you for the response!  



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √