Вопрос

In reports I need to show localised field labels and entity names. For this I need to retrieve some pieces of metadata, namely -- localised entity names.

Can you access metadata in Fetch-based reports? If you can, how severely will performance suffer?

Это было полезно?

Решение

Sorry to say that entity metadata is not exposed via the FetchXml interface as neither "attributes" nor their corresponding "labels" are entities, so cannot be queried.

You can prove this by using the FetchXml builder ([details of getting it and making it work with CRM 2011 are here][1]). You will note that none of the available entities contain the information you seek.

Edit: looking at the core requirement (rather than answering the question in isolation as I originally did), it is possible to include "label" values in FetchXml statements, as @skfd notes in his own answer.

Другие советы

There is a hack to sort of get pick list values and default labels. Quoting from reference:

You must use the distinct clause, and create a seperate dataset to fetch only the option set field like this.

 <fetch version="1.0" output-format="xml-platform" mapping="logical"
 distinct="true">   <entity name="account">
     <attribute name="accountratingcode" />   </entity> </fetch>

This actually returns 2 columns to BIDS -

accountratingcode

accountratingcodevalue

Create a report parameter for the main report and in the Available Values tab specify:

Get Values from a query

Dataset: Seperate Dataset with the Fetch XML above

Value Field: accountratingcodeValue

Label Field: accountratingcode

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top