Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Adding ID (the GUID) value to a view/form

Posted on by 25

I received a request from a customer today that they'd like add the actual ID field to a view (the GUID) for contact. I am still awaiting why they want this in the view....

I thought originally I'd be able to do this with a calculated field but when I try to set it to "<myentity>.contactid" I get an error saying that it can't put a uniqueidentifier into a string field and it doesn't seem like there's a "toString" function that I can use there, unless I'm just unaware of the syntax I need.

I know I could do this with a plugin but is it possible do with a calculated field (or maybe a flow)?

  • RE: Adding ID (the GUID) value to a view/form

    Yes, I'm aware of that but since that's the GUID for the record it doesn't help me as I need the GUID for another field on the form. I actually think if I set up an Advanced find from Contact rather than the child entity I might be able to pull what I need (and as you said, I'd then have the GUID in that hidden column A).

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Adding ID (the GUID) value to a view/form

    Hi,

    You are welcome.

    By the way, when we export data to excel, there are 3 hidden columns in the file (A, B, C).

    The first one (A), holds the GUID of the primary record.

    To make it easier for others, please mark my answer as verified if it is helpful (select 'Yes' under 'Did this answer your question').

  • RE: Adding ID (the GUID) value to a view/form

    Thanks. The workflow would work since it doesn't really have to be real-time. They apparently just need it when they export it to Excel here and there for some other vendor to be able to import it into their system with the ID included. The link you sent won't work because it's not the GUID of the record I'm on that they need but the GUID of a lookup on the form. But interesting nonetheless.

  • Verified answer
    Wahaj Rashid Profile Picture
    Wahaj Rashid 11,319 on at
    RE: Adding ID (the GUID) value to a view/form

    Hi,

    Thank you for your query.

    Calculated fields have a limited set of functions available and do not have type conversion functions:

    Define calculated fields | Microsoft Docs

    Depending on the needs:

    • You can create a flow to populate id (GUID) in another field. But this will run asynchrooulsy.
    • In my opinion, the plugin is a better approach. Just write a simple plugin, which triggers on create and sets the GUID to another field.

    Here is another approach with calculate fields, but it is a bit risky:

    How to Derive and Expose a Record GUID on Your Forms using OOB Functionality | PowerObjects

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans