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 :
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.

I have the same question (0)
  • Suggested answer
    Johao Larios Profile Picture
    1,795 on at

    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!

  • Community Member Profile Picture
    on at

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

  • Verified answer
    Johao Larios Profile Picture
    1,795 on at

    Hello Khan,

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

    Regards,

  • Suggested answer
    ProdevXRM Profile Picture
    10 on at

    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.

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans