Posts

How to Create a SharePoint Folder Through C# Code and Check Whether a Folder Already Exists and upload document Graph API

            var teneantId = ConfigurationManager.AppSettings["TenantId"];             var clientId = ConfigurationManager.AppSettings["ClientId"];             var clientSecret = ConfigurationManager.AppSettings["ClientSecret"]; string accessToken = remoteAssessmentDS.GetGraphToken(teneantId, clientId, clientSecret); string siteId = remoteAssessmentDS.GetSiteId(accessToken, siteName, sitePath); string driveId = remoteAssessmentDS.GetDriveId(accessToken, siteId, ListTitle); var folderId = remoteAssessmentDS.EnsureFolder(accessToken, driveId, RelativeUrl); var filenames = remoteAssessmentDS.GetFilesNamesInFolder_UsingGraph(accessToken, siteId, driveId, folderId);  var file = Convert.FromBase64String(request.File);  bool isDocUploaded = remoteAssessmentDS.UploadDocument(accessToken, siteId, driveId, RelativeUrl, request.FileName, file);  List<string> filenames = new List<string...

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;           ...