function RequestRibbonCustomisation(primaryControl) {
var formContext = primaryControl;
alert("Coming soon! Work in Progress.")
}
function RequestRibbonCustomisation(primaryControl) {
var formContext = primaryControl;
alert("Coming soon! Work in Progress.")
}
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).");
}
}
}
Formats the query result as JSON using the 'FOR JSON PATH' mode, where you have full control over the JSON structure by using column aliases.
SQL Query:-
SELECT
FirstName,
LastName
FOR JSON PATH, WITHOUT_ARRAY_WRAPPER
JSON Output-
{"FirstName":"Ajit","LastName":"Agarwal"}
using System;
using System.IO;
using System.ServiceModel.Description;
using Microsoft.Rest;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Tooling.Connector;
namespace ConsoleApp2
{
internal class Program
{
static void Main(string[] args)
{
string connectionString = @"AuthType=OAuth;
Username=*****************;
Password=*****************;
Url=https://*****************.crm8.dynamics.com;
AppId=*****************;
LoginPrompt=Auto";
Console.WriteLine("Connecting to Dynamics 365..");
using (CrmServiceClient serviceClient = new CrmServiceClient(connectionString))
{
if (!serviceClient.IsReady)
{
Console.WriteLine("Failed to connect: " + serviceClient.LastCrmError);
return;
}
IOrganizationService service = (IOrganizationService)serviceClient.OrganizationWebProxyClient ?? (IOrganizationService)serviceClient.OrganizationServiceProxy;
Console.WriteLine("connected to Dynamics Crm ");
QueryExpression query = new QueryExpression("pluginassembly")
{
ColumnSet = new ColumnSet("name", "content")
};
EntityCollection results = service.RetrieveMultiple(query);
foreach (Entity plugin in results.Entities)
{
string name = plugin.GetAttributeValue<string>("name");
string content = plugin.GetAttributeValue<string>("content");
if (string.IsNullOrEmpty(content))
{
Console.WriteLine($"Assembly '{name}' has no content.");
continue;
}
byte[] dllBytes = Convert.FromBase64String(content);
string fileName = $"{name}.dll";
File.WriteAllBytes(fileName, dllBytes);
Console.WriteLine($"Downloaded: {fileName}");
}
Console.WriteLine("All assemblies downloaded successfully.");
}
}
}
}
CRM does not allow direct download of the DLL file from the UI. However, there are several ways to retrieve the plugin DLL from the CRM environment. we achieve this requirement using XrmToolBox.
A Service Level Agreement (SLA) in Dynamics 365 CE (Customer Service module) defines response and resolution times for service cases to ensure customer satisfaction. It helps in tracking, monitoring, and automating service commitments.
Before configuring SLAs, ensure that SLAs are enabled:
SLAs in Dynamics 365 consist of:
Now, configure the rules and conditions for SLA tracking.
Each SLA item allows defining actions upon success, warning, or failure:
Save & Close SLA Item.
🔹 Pause & Resume SLA: Configure SLA pause for cases on hold.
🔹 Multiple SLAs: Assign different SLAs based on case type or customer.
🔹 Power Automate Integration: Trigger advanced notifications and escalations.
function GetloggedUser () {
var roles = Xrm.Utility.getGlobalContext().userSettings.roles;
if (roles === null) return false;
var hasRole = false;
roles.forEach(function (item) {
if (item.name.toLowerCase() === "manager" || item.name.toLowerCase() === " System administrator") {
hasRole = true;
}
});
return hasRole;
}
function RequestRibbonCustomisation(primaryControl) { var formContext = primaryControl; alert("Coming soon! Work in Progress....