Now Available in Community - New TechTalk Videos for 2020
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
The below statement throws me below error
"The type 'System.String' for the query operator is not Queryable!" error at Microsoft.Dynamics.AX.Framework.Linq.Data.AXQueryFormatter.VisitMethodCall(..
var qryShipConfirmDate = context.UMAWHSOutboundShipmentHeaderEntity .Where(x => x.AccountNum.StartsWith("27384")) .OrderByDescending(o => o.ShipConfirmUTCDateTime) .FirstOrDefault();
How to solve this?
I need Maximum date from ShipConfirmUTCDateTime column with condition AccountNum column contains 27384
Could you share any more details about your situation? What type of solution are you developing?
This statement would give you the result that you need:
select firstonly UMAWHSOutboundShipmentHeaderEntity
order by ShipConfirmUTCDateTime desc
where UMAWHSOutboundShipmentHeaderEntity.AccountNum == '27382';
It is Data Integration application developed in Visual studio 2015 with C# as code behind. I make API calls of D365FO entity through OData and do my business logic. UMAWHSOutboundShipmentHeaderEntity entity is a custom entity. What I am trying to do is I need Maximum date from ShipConfirmUTCDateTime column with condition AccountNum column contains 27384
Is that field a physical field in your entity data source, or some field that you calculate when the entity is read?
If it's not physical, then you can't filter or sort by it. Perhaps that would explain your problem?
It is a physical field. Both "ShipConfirmUTCDateTime" and "AccountNum" are refereed from WHSShipmentTable
Which of the statements causes the problem? For instance, will it work if you remove Where(x => x.AccountNum.StartsWith("27384"))? (This one looks the most suspicious to me.)
yes. you are correct. I replaced it with below statement and it worked.
Where(x => x.AccountNum.Equals("27384*"))
Business Applications communities