Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Plugin Guid declaration

(0) ShareShare
ReportReport
Posted on by

I want to know that If my code is 

Entity account=new Entity("account");

Guid  gid=account.id;

what happen  if I am not used guid .what the 2 line meanining and why it is decalare when we define entity.

  • Suggested answer
    ProdevXRM Profile Picture
    10 on at
    RE: Plugin Guid declaration

    Hi,

    If you are not using a guid in the declaration, you will receive an error on compile time, that you cannot convert the type "System.Guid" to the type that you will use.

  • Verified answer
    Johao Larios Profile Picture
    1,795 on at
    RE: Plugin Guid declaration

    Hello Khan,

    Please test the code I provided, I think it should work without the guid.

    Regards,

  • Community Member Profile Picture
    on at
    RE: Plugin Guid declaration

    My question is what error will come if I am not using guide declaration.

  • Suggested answer
    Johao Larios Profile Picture
    1,795 on at
    RE: Plugin Guid declaration

    Hello Khan,

    This is because the system "helps" developers to write less code, for example:

    Entity newAccount = new Entity("account");

    newAccount["name"] = "TEST";

    service.Create(newAccount);

    this should work.

    Regards!

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Holly Huffman Profile Picture

Holly Huffman 103

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 96 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 51 Most Valuable Professional

Product updates

Dynamics 365 release plans