Sunday, December 10, 2023

Dynamics 365 - Count Waiting Worklow Sessions

Use the below query in FetchXML Counter plugin in XrmToolbox to count the workflow sessions in waiting state.

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="asyncoperation">
    <attribute name="asyncoperationid"/>
    <attribute name="name"/>
    <attribute name="createdon"/>
    <attribute name="statuscode"/>
    <attribute name="statecode"/>
    <order attribute="createdon" descending="true"/>
    <filter type="and">
      <condition attribute="operationtype" operator="eq" value="10"/> <!-- 10 corresponds to workflow -->
      <condition attribute="statecode" operator="eq" value="3"/> <!-- 3 corresponds to waiting state -->
      <condition attribute="name" operator="like" value="Modified date Ageing reminder"/> <!-- Replace with the name of your workflow -->
    </filter>
  </entity>
</fetch>

Wednesday, December 6, 2023

Dynamics 365 Rich Text Editor - Enable HTML Tab

 To enable both the Designer and HTML view in OOB rich text editor, follow these steps.


 

Add the OOB web resource to your solution if required. The URL is

msdyn_/RichTextEditorControl/RTEGlobalConfiguration.json

 

 

This file will be empty. Paste the following sample configuration and publish the web resource. This will enable the HTML tab globally including the RTE for notes in timeline (if enabled).

 {
  "defaultSupportedProps": {
    "font_defaultLabel": "Arial",
    "fontSize_defaultLabel": "10",
    "stickyStyle": {
      "font-size": "10pt",
      "font-family": "'Arial',sans-serif"
    },
    "toolbarLocation": "bottom",
    "copyFormatting_allowRules": true
  },
  "showAsTabControl": true,
  "showFullScreenExpander": true,
  "showHtml": true,
  "showPreview": false,
  "showPreviewHeaderWarning": false,
  "disallowUserPersonalization": true
}

To enable for control only on a specific page:

Create a new JavaScript webresource and paste the above code in it. 

Add the RTE Control to the multiline text box.

Paste the Web Resource URL in the Static value textbox.

/WebResources/MyRTEConfig.js

 

 

Publish the form to see the changes.