Posts

Power pages custom button add in gried

  $(document).ready(function () {     // Loop through table rows after entity list loads     $(".entity-grid .view-grid table tbody tr").each(function () {         var recordId = $(this).attr("data-id"); // row GUID         if (recordId) {             var viewBtn = `<button class="btn btn-primary btn-sm view-btn"                              onclick="openDetails('${recordId}')">View</button>`;             $(this).find("td:last").append(viewBtn); // put button in last column         }     }); }); function openDetails(id) {     // Replace with your detail page URL     var detailPageUrl = "/bankaccount-details/";     window.location.href = detailPageUrl + "?id=" + id; }

Custom Date Rang HTML d365

Image
  Copy code in VS and save as HTML <html> <head>     <meta charset="utf-8">     <title></title>     <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">     <link href="https://cdn.datatables.net/1.10.1/css/jquery.dataTables.css" rel="stylesheet" id="datatable-css">     <link href="https://cdn.datatables.net/responsive/1.0.0/css/dataTables.responsive.css" rel="stylesheet" id="datatable-responsive-css">     <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/1.3.1/css/toastr.css" rel="stylesheet">     <script src="https://code.jquery.com/jquery-1.9.1.js"></script>     <script src="https://cdn.datatables.net/1.10.1/js/jquery.dataTables.min.js"></script>     <script type="text/javascript...

Custom web resource create d365

Image
  HTML code <html> <head>     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Styled Table with Loader</title>     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">     <script type="text/javascript" src="ClientGlobalContext.js.aspx"></script>     <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>     <style>         table#ComCareAlertsTable, body {             font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;           ...

Update record when checkbox checked using JavaScript and save d365

On checkbox on change following function called -------------------------------------------------------------------- function IsClientDisease(executionContext) {     debugger;     var formContext = executionContext.getFormContext();     var selectedValues = formContext.getAttribute("ecl_isclientdisease").getValue();     var id = formContext.data.entity.getId().replace("{", "").replace("}", "");     if (selectedValues == 1) {         var fetchbooking = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +             "  <entity name='contact'>" +             "    <attribute name='fullname' />" +             "    <attribute name='telephone1' />" +             "    <attribute name='contactid' />" +  ...