Hi,
The following fetchXml works fine against OrgSvc:
<fetch top='50' aggregate='true' > <entity name='account' > <attribute name='cf_customerclassification' alias='classification' groupby='true' /> <attribute name='cf_segment' alias='segment' groupby='true' /> <link-entity name='peikko_memo' from='peikko_account' to='accountid' link-type='inner' alias='account' > <attribute name='peikko_date' alias='quarter' groupby='true' dategrouping='quarter' /> <attribute name='createdon' alias='cnt' aggregate='count' /> <filter> <condition attribute='ownerid' operator='eq' value='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' /> <condition attribute='peikko_date' operator='in-fiscal-year' value='2017' /> </filter> </link-entity> </entity> </fetch>
I'm porting all the scripts to use WebAPI instead of REST+SOAP. When the same fetchxml is executed against WebAPI, I get this error message:
The property provided was of type System.Int32, when the expected was of type System.DateTime
Anyone had the same problem?
Thank you,
Laszlo
*This post is locked for comments
Thanks for the info Laszlo
Hi Stefan!
I'm also still experiencing the same issue at multiple customers, in online envs. I have a support ticket open @MS, they said that the fix has been scheduled for 2nd week of Nov. Will probably be rolled out in the next update after that.
Cheers,
Laszlo
Hi Laszlo, I'm still hitting this issue with REST api. It's onprem version 9.0.21.8
Thanks for the additional information! I have been able to repro in house, but please note the issue has been fixed in the latest Dynamics 365 version (9.0*). We will evaluate what it would take to enable this in the 8.2 version.
Hi Brandon,
First of all: thank you for looking into the problem!
I could still reproduce on a 8.2 online environment with this fetchxml:
<fetch top='50' aggregate='true'>
<entity name="account">
<attribute name="industrycode" alias='industrycodes' groupby='true'/>
<attribute name="accountratingcode" alias='ratingcodes' groupby='true'/>
<link-entity name="contact" from="contactid" to="primarycontactid" link-type="inner" alias="thecontact">
<attribute name="modifiedon" alias='quarter' groupby='true' dategrouping='quarter'/>
<attribute name="createdon" alias='cnt' aggregate='count'/>
<filter>
<condition attribute="modifiedon" operator="in-fiscal-year" value="2018" />
</filter>
</link-entity>
</entity>
</fetch>
The difference is that the attribute causing the problem has to appear as
In your example two different fields were referenced:
<attribute name="modifiedon" alias='quarter' groupby='true' dategrouping='quarter'/>
<attribute name="createdon" alias='cnt' aggregate='count'/>
<filter type="and">
<condition attribute="ownerid" operator="eq" uiname="Brandon Simons" uitype="systemuser" value="{278742B0-1E61-4FB5-84EF-C7DE308C19E2}" />
<condition attribute="createdon" operator="in-fiscal-year" value="2017" />
</filter>
BR,
Laszlo
Hello -
Are folks still hitting this issue? I have tried to create a repro, but haven't been able to get the error. Here is an example of what I am using (trying to use out-of-box schema as I don't have custom schema).
-Brandon
MS Product Team
I met the MS Program Manager in Dubrovnik @eXtreme365, he forwarded the problem to his colleagues.
On Premise
@dynamicWrittern, If you're online, you'll need to have an Office 365 admin to submit it.
@Daryl LaBar how do I submit a ticket with MS?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156