Search code examples
dynamics-crmmicrosoft-dynamicsguiddynamics-365

Are Dynamics CRM GUIDS stored in upper-case or lower-case in the CRM Back-end?


I'm currently trying to work out if the GUID's which are CRM's Unique Identifiers for it's back-end are Stored in uppercase or lowercase and if the GUID's are case sensitive. What I mean is this:

If a record has a GUID of 8a16e427-97e6-e811-a980-00224800510b
and another record has a GUID of 8A16E427-97E6-E811-A980-00224800510B (The same, but with upper case letters)

A. Is this scenario even possible? B. Would they be treated as the same record? C. If I went to produce an extract would they all come out as lower-case or upper-case? D. How would I even go about checking the back-end SQL Tables myself?


Solution

  • I'm currently trying to work out if the GUID's which are CRM's Unique Identifiers for it's back-end are Stored in uppercase or lowercase and if the GUID's are case sensitive.

    I'm pretty sure its uppercase, but that isn't really important.

    Guid's are not strings, so the casing of the guid isn't relevant. They are 128-bit integers, which are often expressed as hexadecimal strings.

    So 8a16e427-97e6-e811-a980-00224800510b and 8A16E427-97E6-E811-A980-00224800510B are equal because they represent the same hexadecimal value.

    See Creating different GUID for same lowercase and upper case strings.

    A better consideration is how are the guids being compared? For example if someone was to treat them as string type (rather than guid), then your values could be considered to be different (as strings).

    If a record has a GUID of 8a16e427-97e6-e811-a980-00224800510b and another record has a GUID of 8A16E427-97E6-E811-A980-00224800510B (The same, but with upper case letters)

    A. Is this scenario even possible?

    No, becuase these two guids are the same. Each record has a unique guid. Casing isn't relevant.

    B. Would they be treated as the same record?

    These two guids refer to the same record - because they are the same guid.

    C. If I went to produce an extract would they all come out as lower-case or upper-case?

    Depends how you extracted them, but again casing of the guid isn't relevant.

    D. How would I even go about checking the back-end SQL Tables myself?

    If you are on-premise speak to your database administrator. If you are online you would have to ask Microsoft for a copy of the database.