Quantcast
Viewing all articles
Browse latest Browse all 79901

How to get the Guid of an CRM entity?

Hi, In my CRM Plug in, after the entity is created, I need to get its Guid.

This is what I did:

Guid entityId = Guid.Empty;

.....

entity = CreateNewEntity("Account_logicalname", "accountnumber"); //here the entity is created.

entityId = (Guid)entity.Id; //this code does not work, it the entityId returns "00000000-0000-0000-0000-000000000000 "

is my codes wrong ?

Are there any other method to get the Guid of an given entity in this situation?

Thank you so much for your help,

Peter


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>