Saturday, 16 August 2025

Retrieves the record GUID (ID) using isDirty function.

isDirty() → This function is used to check whether the form data has been changed but not yet saved.

// JavaScript source code

function retrieveEntityInfo(executionContext) {

    if (executionContext != null) {

        var formContext = executionContext.getFormContext();

        var accountId = formContext.data.entity.getId();

        if (accountId) {

            alert("Account GUID: " + accountId);

        } else {

            alert("This Account record has not been saved yet (no GUID).");

        }

    }

}


No comments:

Post a Comment

Secure and Unsecure configuration in Dynamics CRM 365.

Overview : In Dynamics CRM, when we create a plugin, we sometimes need to pass data to that plugin, instead of writing this data inside the ...