Get the current record ID using JavaScript in D365 CE – Vblogs

PHOTO EMBED

Mon Oct 25 2021 16:34:57 GMT+0000 (Coordinated Universal Time)

Saved by @divyasekaran

var formCustomizations = {
    getRecordDetail: function (executionContext) {
        var formContext = executionContext.getFormContext();
        var recordId = formContext.data.entity.getId();
        var entityName = formContext.data.entity.getEntityName();
        alert(`Record GUID: ${recordId} and Entity Name: ${entityName}`);
    }
}
content_copyCOPY

https://vblogs.in/get-the-current-record-id-using-javascript-in-d365-ce/