web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

The type 'System.String' for the query operator is not Queryable!

(0) ShareShare
ReportReport
Posted on by 417

Hi,

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

Pls help.

Regards,
Manivannan

I have the same question (0)
  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: The type 'System.String' for the query operator is not Queryable!

    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';

  • vannamani77 Profile Picture
    417 on at
    RE: The type 'System.String' for the query operator is not Queryable!

    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

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: The type 'System.String' for the query operator is not Queryable!

    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?

  • vannamani77 Profile Picture
    417 on at
    RE: The type 'System.String' for the query operator is not Queryable!

    It is a physical field. Both "ShipConfirmUTCDateTime" and "AccountNum" are refereed from WHSShipmentTable

  • Martin Dráb Profile Picture
    236,847 Most Valuable Professional on at
    RE: The type 'System.String' for the query operator is not Queryable!

    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.)

  • vannamani77 Profile Picture
    417 on at
    RE: The type 'System.String' for the query operator is not Queryable!

    yes. you are correct. I replaced it with below statement and it worked.

    Where(x => x.AccountNum.Equals("27384*"))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 756 Super User 2025 Season 2

#2
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 678

#3
Martin Dráb Profile Picture

Martin Dráb 526 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans