Tuesday, August 28, 2012

Everest error "Unable to load requested data" 80020073

Creating XML queries for the List functions in the Everest API (Everest SDK) can be pretty painful.  They give some examples, but if you're trying to select columns or specify conditions that aren't in their examples, then you have to know the correct field name to use.  I think some are listed in an XML schema somewhere, but they're definitely hard to find.  I usually use the EOBrowser to do a Retrieve to see a "full" list of field names. Then I try to use those field names in my query XML.  That works sometimes, but the field names aren't always the same between the Retrieve columns and the XML Query columns used in List.

If you try a column name in your query XML and it isn't right, then usually you will get an error like this:

<ErrorDetails>
<ErrorMessage>
<LineNumber>19</LineNumber>
<Character>24</Character>
<Reason>Union doesn't support this value.
The element: 'Column'  has an invalid value according to its data type.
</Reason>
</ErrorMessage>
<ErrorCode>8001FA00</ErrorCode>
</ErrorDetails>

But occasionally, you get this exceptionally vague error:

<ErrorDetails>
<ErrorMessage>Unable to load requested data</ErrorMessage>
<ErrorCode>80020073</ErrorCode>
</ErrorDetails>

That error does not make it clear at all that one of your column names is wrong.  Maybe the error shows up in other situations too, but for me it was just a column name.  In my case, I was trying to make a query condition using
<Column>Location</Column>
but the correct column name for Location in the XML query conditions is
<Column>LocSubLoc</Column>