Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

[C#] AttributeMetadata "IsSearchable" always false

Posted on by Microsoft Employee

I'm trying to access AttributeMetadata using Microsoft.Xrm.Tooling.Connector (link) using the GetAllAttributesForEntity function.

var entityAttributes = client.GetAllAttributesForEntity("account");

foreach (var attribute in entityAttributes)
{
  // attribute.IsSearchable.Value is always false
}

However, it seems that the attribute "IsSearchable" (and perhaps other attributes, but our focus is on this) is always false, however, in CRM the attribute is set to Yes for most fields. Is there something I'm missing?

*This post is locked for comments

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: [C#] AttributeMetadata "IsSearchable" always false

    "IsSearchable" supports the product infrastructure and is not intended to be used directly from your code.

    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/mt621852(v%3dcrm.8)

    Have a look below old thread -

    community.dynamics.com/.../316246

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: [C#] AttributeMetadata "IsSearchable" always false

    This seems to work! What does "IsSearchable" represent then?

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: [C#] AttributeMetadata "IsSearchable" always false

    Hi ,

    Please check "IsValidForAdvancedFind" -

    docs.microsoft.com/.../microsoft.xrm.sdk.metadata.attributemetadata.isvalidforadvancedfind

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans