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
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);
}
);
Was this reply helpful?YesNo
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.