Hide the Default Edit Button
Use CSS or JavaScript to hide the out-of-the-box edit button in the entity list.
css
.entitylist .edit-link {
display: none;
}
Add a Custom Edit Button
Use JavaScript/jQuery to dynamically insert a custom edit button into the entity list.
$(document).ready(function () {
$(".entitylist.entity-grid").on("loaded", function () {
$(".edit-link").each(function () {
$(this).replaceWith('<button class="custom-edit-btn">Edit</button>');
});
});
});
Trigger the Custom Modal on Click
When the user clicks the custom edit button, open your custom modal instead of the default form.
javascript
$(document).on("click", ".custom-edit-btn", function () {
$("#customEditModal").modal("show");
});
Load the Record Data into the Modal
Fetch the record ID and populate the modal fields dynamically using Dataverse Web API or JavaScript.
javascript
function loadRecordData(recordId) {
$.ajax({
url: `/api/data/v9.1/entities(${recordId})`,
type: "GET",
success: function (data) {
$("#customField").val(data.customFieldValue);
}
});
}
Save Changes from the Modal
When the user submits the modal form, update the record using Power Automate or Dataverse API.
javascript
$("#saveChangesBtn").click(function () {
var updatedData = { customField: $("#customField").val() };
$.ajax({
url: `/api/data/v9.1/entities(${recordId})`,
type: "PATCH",
data: JSON.stringify(updatedData),
success: function () {
alert("Record updated successfully!");
location.reload();
}
});
});
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43