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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get GUID for state loop up field

(0) ShareShare
ReportReport
Posted on by

Dear All,

I have a look up field for states now when I need to set value for it I have to have guid for that state.

      Liek this:      account.Attributes["state"] = new EntityReference("State", new Guid("B4C2A9D2-9D4A-YYYY-XXX-12B796D1D7F2"));*/

Now my question is I don't know guid for each state, what is the best way to retrieve it from CRM?

Thx

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi,

    You could navigate to the view showing all the records of State entity. Click on Export to Excel in the command bar. Refer the screenshot below.

    1541.2.PNG

    An Excel Sheet showing the details of all the state records will be downloaded. Once we open the excel sheet, it will be as follows.

    1541.2.PNG

    The first column of this excel sheet gives you the Guid Ids of the state records. This is one of the easy ways to get the guid id of the records.

    Hope this helps you.

  • Suggested answer
    Community Member Profile Picture
    on at

    Refer this:

    https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.iorganizationservice.retrievemultiple.aspx

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans