I am trying to read data from a custom report in CRM Online through the API.
I have no problem fetching data like competitors, accounts using
OrganizationService.RetrieveMultiple()
But when it comes to custom reports, I can't find a way. The report I would like to read is found in the CRM web interface under Dashboard -> (My organization) -> Reports.
I hope someone can point me in the right direction. Thanks!
I am also interested in this. Did you ever figure it out?
Sorry about not leaving this as comment, but apparently I don't have permissions.
Actually, I may have stumbled on the solution.
I noticed that when you download the report definition it has a field called d:CustomReportXml. In my custom reports this field contains XML code.
<d:CustomReportXml><CustomReport><Language>1033</Language><Query><fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="appointment"><attribute name="createdby" alias="createdby" /><attribute name="createdon" alias="createdon" /></entity></fetch></Query><Groupings /><Columns><Column ID="createdby0" Field="createdby" Width="100" /><Column ID="createdon0" Field="createdon" Width="100" AddRawValueColumn="true" /></Columns><TableLayout Display="Normal" /></CustomReport></d:CustomReportXml>
inside the XML is a fetch tag
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="appointment"><attribute name="createdby" alias="createdby" /><attribute name="createdon" alias="createdon" /></entity></fetch>
I have been able to parse this out and pass it back to dynamics via the api and get back results. I am using http://www.xrmtoolbox.com/ to test the results and so far things look promising.
I can also add a filter to the fetchXML so I don't end up with too much data.
I hope it helps you.
Related
Trying to understand the concept of the code datatype in hl7-fhir. Looking at the appointment (https://www.hl7.org/fhir/appointment.html) resource as an example it has a status parameter with suggested values of "proposed | pending | booked" etc.
Given an existing database with it's own custom status' (Attended, Confirmed, Attended but late) what is the correct way to handle a hl7-fhir response to a consumer?
If the "code" data type is used, then the FHIR binding strength is always "required" - which means you are required to use the FHIR-defined list of codes and no others.
It appears that two of your statuses - "Attended" and "Attended but late" aren't actually statuses of the appointment - the booking, but are instead commentary about the resulting encounter. So I would capture those as extensions. "confirmed" sounds similar to "booked", though I'd need to know the definition to know for sure. Do you have any appointment statuses for appointments that are not yet confirmed (let alone attended)?
To extend on Lloyds notes, you will want to put the extension under the status property, and map your existing values to the provided FHIR values, and put your local actual value in the extension underneath.
This way when other systems read the resource and don't know about your extension status values, they will still be able to act sensibly based on the core values.
<status value="fulfilled">
<extension url="http://yourorg.com/fhir/.../ExtendedAppointmentStatuses">
<valueCoding>
<code value="abl" />
<display value="Attended but late" />
</valueCoding>
</extension>
</status>
We're trying to update a number of Google contacts, using the {thin} feed projection
PUT https://www.google.com/m8/feeds/contacts/{user}/thin/{id}
but we're getting the following errors from Google contacts API:
<errors xmlns="http://schemas.google.com/g/2005">
<error>
<domain>GData</domain>
<code>invalid</code>
<internalReason>gd:extendedProperty count limit exceeded: 10</internalReason>
</error>
</errors>
When using the {thin} feed projection extended properties are not even loaded or manipulated, according to the API reference: "thin - No gd:extendedProperty elements are returned/updated".
This looks like the API bug.
#SGC, the answer does not seem to be relevant. We use {thin} project to avoid loading/updating any extended properties. Why does the API complain this way?
#Google can someone help with this issue?
In the documentation, its mentioned that, if you use thin property No gd:extendedProperty elements are returned/updated. Check this link
I'm trying to use REST API with filters but apparently it doesn't work.
With http://192.168.10.99/api/rest/products/2 I get the following result:
<magento_api>
<entity_id>2</entity_id>
<type_id>simple</type_id>
<sku>2</sku>
<name>Borsa Gucci</name>
<meta_title/>
<meta_description/>
<size_intl>16</size_intl>
<description>borsa gucci</description>
<short_description>borsetta</short_description>
<meta_keyword/>
<tier_price/>
<is_in_stock>0</is_in_stock>
<regular_price_with_tax>1000</regular_price_with_tax>
<regular_price_without_tax>1000</regular_price_without_tax>
<final_price_with_tax>1000</final_price_with_tax>
<final_price_without_tax>1000</final_price_without_tax>
<is_saleable>0</is_saleable>
<image_url>
http://192.168.10.99/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/image.jpg
</image_url>
<url>
http://192.168.10.99/index.php/catalog/product/view/id/2/s/borsa-gucci/
</url>
<buy_now_url>
http://192.168.10.99/index.php/checkout/cart/add/uenc/aHR0cDovLzE5Mi4xNjguMTAuOTkvYXBpL3Jlc3QvcHJvZHVjdHMvMg,,/product/2/form_key/wbRnSbkWsgjNy7KT/
</buy_now_url>
<total_reviews_count>0</total_reviews_count>
<has_custom_options/>
</magento_api>
If then I try http://192.168.10.99/api/rest/products?filter[0][attribute]=entity_id&filter[0][in]=2 I get the following result:
*This XML file does not appear to have any style information associated with it. The document tree is shown below.
< magento_api/>*
Where I'm doing wrong?
Thanks
Alexio
Finally I've figured out what was the problem.
Without filters if the products exists in Magento it will be showed, but using filters it also need to be in stock (if you do manage stock).
Nice experience of debugging Magento even if the issue wasn't a bug :-)
I'm developing a simple Web App which has a simple data from some employees, such as ID, NAME and so on. Thus, I'm using a XML file as my database. Yet, my XML file is sorted by the Employees' ID.
However, I'm using a to select the Employee's Name and show some informations about him/her, but when I created the bindable data through my spark component (I just "drag-and-drop" my XML file into the component), I'd like to show those names sorted by Name and this is my problem.
It's suppose to be a simple code, but I'm in trouble with it... lol!
<s:DropDownList id="ddNome"
labelField="NomeFuncionario" <!-- Employees' Name -->
textAlign="justify"
width="240" height="25"
top="30" horizontalCenter="0"
initialize="sortName(event)" <!-- Trying to create it now... -->
creationComplete="cbNome_creationCompleteHandler(event)"
change="cbNome_changeHandler(event)">
<s:AsyncListView list="{getDataResult2.lastResult}"/>
</s:DropDownList>
I'd be really grateful for any help with this code.
you can try something like this
<mx:XMLListCollection id="xmlListColl"
source="{getDataResult2.lastResult}">
<mx:sort>
<mx:Sort>
<mx:fields>
<mx:SortField id="sortField"
name="#NomeFuncionario"
caseInsensitive="true" />
</mx:fields>
</mx:Sort>
</mx:sort>
</mx:XMLListCollection>
...
<s:AsyncListView list="{xmlListColl}"/>
...
I am trying to read (FetchXml) the content of all the readable attributes of all the entities based on the list I get using the metadata webservice.
This works fine except for 3 entities ("resourcegroupexpansion", "workflowwaitsubscription" and "interprocesslock") for which I systematically get the following error:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request.</faultstring>
<detail>
<error>
<code>0x80040216</code>
<description>An unexpected error occurred.</description>
<type>Platform</type>
</error>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
According to this http://msdn.microsoft.com/en-us/library/gg328086.aspx those 3 entities are for internal use only which might explain why I get an error (having said that I’m able to read other “internal use only” entities).
So my question is this: how can I detect from the metadata which entities are “for internal use only” and which are not ?
Of course, I could hard-code the list of entities based on the documentation but I don’t find it very satisfying.
Unfortunately there is No flag to identify the "for Internal use only" entities.
But one thing I noticed from XrmToolbox Metadata browser - the description column of entity is having "for Internal use only" text for ~15 entities.
We can leverage the same by identifying & updating this field with unique values for internal system entities (thru some unsupported way like export solution, modify & reimport). Then description field text can be used to filter out these internal entities.
I never tried this. Will try & update my answer soon.