Quantcast
Viewing all articles
Browse latest Browse all 2504

Getting NamedId names for custom fields

Topic by Artyom Fedorychak

Content

Hello,

As we know, by default, names are not returned for NamedId fields (be it a standard field or a custom one). One can use fetchAllNames processing option to get names, but what if I only want to fetch names for a select number of custom fields?

The way to achieve this has always been undocumented and inconsistent. For example, in v1.0 of the API to get names for custom field "fieldA" while doing Get I would have to pass something like

<o:CustomFields dataType="NAMED_ID" name="c$fieldA">

          <g:DataValue>

            <g:NamedIDValue/>

          </g:DataValue>

        </o:CustomFields>

That worked, however, it would also trigger getting names for ALL other custom fields.

For QueryObjects operation I couldn't get names no matter what I was sending (and believe me I tried pretty much all combinations). It seems like with QueryObject the only option was using fetchAllNames.

Now I'm on API v1.2 and it seems like Get operation has become consistent (or consistenly broken?) with QueryObjects meaning it's impossible to get name except for using fetchAllNames.

So, what's going on with this? Is this a feature or a bug? How should I get those names if I don't want to use fetchAllNames?

Version

Nov 12

Viewing all articles
Browse latest Browse all 2504

Trending Articles