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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Primary field of an entity in Generic Plugin

(0) ShareShare
ReportReport
Posted on by 40

Hi Team,

I would like to write a sample generic plugin (Ex: Task Creation) on create of ANY entity record.
I would like to use the primary field of that particular entity on which this plugin get registered.

Any idea, how to get the primary field of any entity(Schema names of primary field varies with the entities).

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Prashant_ Profile Picture
    1,040 on at

    Hi Praveen, You can register plugina and steps using sdk following link will help you to understand it.

    https://www.magnetismsolutions.com/blog/gayanperera/2016/03/03/register-crm-2016-plugins-and-steps-programmatically

    Now to get all entities and there primary field name you have to query meta data .following link might hep you

    stackoverflow.com/.../dynamics-crm-how-to-get-list-of-all-entities

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    you can get the primary field via below article. You have to use metadata.

    blogs.msdn.microsoft.com/.../understanding-crm-metadata-primarykey-and-primaryfield

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans