Posts

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' />" +  ...

Message show dialog with ok button using javascript d365

  if (evrVarRec != null && evrVarRec.entities != null && evrVarRec.entities.length > 0) {                 var alertStrings = { confirmButtonLabel: "Ok", text: "In system found workorders which system status not unsheduled and completed. Please first update the status completed after try again!", title: "Alert" };                 var alertOptions = { height: 120, width: 260 };                 Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(                     function (success) {                         formContext.getAttribute("ecl_isclientdisease").setValue(false);                     },                     function (erro...

FetchXmlFormatter code to c# javascript

  Fetch Xml Formatter Tool Online (ashishvishwakarma.com) https://arunpotti.com/2014/11/15/fetchxml-formatter-tool/

Email send Via Workflow/ Plugin in d365

  public class SendEmailList         {             public string ResourceName { get; set; }             public string RACFName { get; set; }             public string WONumber { get; set; }             public DateTime? StartDate { get; set; }             public DateTime? EndDate { get; set; }             public string EmailId { get; set; }             public string CreatedBy { get; set; }             public string UserName { get; set; }             pub...

How check app access checker user role details in d365

Image
  Search user :

How to set multiple lookup value by JavaScript d365

                        var lookupValue = new Array();                 if (result.entities[0] != undefined) {                     lookupValue[0] = new Object();                     lookupValue[0].id = result.entities[0].contactid;                     lookupValue[0].name = result.entities[0].fullname;                     lookupValue[0].entityType = "contact" ;                 } ...

Create Ribbon on subgrid and selected record on show button

Image
 1.  create button. 2. Add command. 3. Add enable rule Hide Rule function updateStatus(selectedrecord, formContext, commandProperties) {        debugger ;        //alert("Called Javascript");        if (commandProperties.SourceControlId.includes( "EOL.Button" )) {               update(selectedrecord, "EOL" )        }        else if (commandProperties.SourceControlId.includes( "Respite.Button" )) {               update(selectedrecord, "Respite" )        }        else if (commandProperties.SourceControlId.includes( "NotResident.Button" )) {               update(selectedrecord...