Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get entity schema from web resource

(0) ShareShare
ReportReport
Posted on by

Hi everyone,

I want to use a webresource in multiple forms. I would like to be able to retrieve form's current entity schema name (the one with upper cases, not the one from "Xrm.Page.data.entity.getEntityName();") in order to build odata query: like "/AccountSet?$select=Name, ...". So I need to get the schema name for the current entity, like "Account" and not account from Xrm.Page.data.entity.getEntityName()

Is there a way to get the schema name with webresource javascript?

Thanks everyone

*This post is locked for comments

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 19 on at
    RE: Get entity schema from web resource

    The Xrm API doesn't give you the entityset name (which may not be simply 'Set' appended on to the end of the Entity Schema name.

    You'll need to query the metadata WebAPI using the entity logical name as a $filter - see msdn.microsoft.com/.../mt607522.aspx

    Hope this helps

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans