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

Community site session details

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

Dataverse create new uniqueidentifier GUID column for external system integration

(2) ShareShare
ReportReport
Posted on by 3,195
Hi All
Is there a way to create a second guid column in a table? This is to create link to a external system and here we store guid of external system record from ERP. I know alternate keys but prefer guid since its cuts down extra steps when retrieving records via Power Automate using get row by id from Business Central
I have the same question (0)
  • Verified answer
    Ali Hamza Profile Picture
    170 on at
    Dataverse create new uniqueidentifier GUID column for external system integration
    Hi @
     
    It’s not possible to add another GUID column that can serve as the primary column or be used in Power Automate’s "Get a Row by ID" action.

    Alternate keys will definitely work in this scenario, especially when records already exist or are created before syncing with ERP in Dataverse.

    However, if the record is created in response to an action in ERP (e.g., when the record is first created in ERP and then synced back to CRM), you can pass the GUID from ERP to CRM and set it in the primary GUID field. CRM won’t auto-generate a GUID for the record and will use the GUID provided from ERP.
    For example, if you’re creating a lead from JS code, we’ll write below code. 
     
    Note: Guid must be unique otherwise CRM will raise unique guid error.
     
    var record = {};
    record.subject = "TEST LEAD..."; // Text
    record.leadid = "37cde8bb-a249-ef11-bfe3-00224880ce44"; // Guid
    record.lastname = "TEST Last name"; // Text
    Xrm.WebApi.createRecord("lead", record).then(
        function success(result) {
            var newId = result.id;
            console.log(newId);
        },
        function(error) {
            console.log(error.message);
        }
    );
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 228

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 149

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans