Workflow must be in Published state

The above error message is displayed in Dynamics 365 and most of the developers\users will look around workflows as the error says “Workflow must be in Published state.”

E.g. Creating a case throws the above error with the following details.

[Microsoft.Crm.Service.GlobalSlaPlugin: Microsoft.Crm.Service.GlobalSlaPlugin.SlaPostCreatePlugin]
[ebd908b4-2c74-e811-a95d-000d3ae0bc37: ObjectModel Implementation]

The issue is with SLA records associated with Case.

Deactivating SLA records and reactivate them back will resolve the issue.

 

Advertisements

Status Change using WebApi

In Dynamics 365, OOTB status field value can be changed in many different ways.

Following WebApi can be used to update the Status (statecode + statuscode) as follows.

changeStatus = function (executionContext, entityLogicalName, recordId, statecode, statuscode) {
// Remove brackets from the GUID if there’s any
var id = recordId.replace(“{“, “”).replace(“}”, “”);
// Set statecode and statuscode
var data = {
“statecode”: statecode,
“statuscode”: statuscode
};
// WebApi call
Xrm.WebApi.updateRecord(entityLogicalName, id, data).then(function  success(result) {
executionContext.getFormContext().data.refresh(true);
}, function (error) {
executionContext.getFormContext().data.refresh(true);
});
};

Advanced Find – “NOT IN” Query is Supported in v9.0

Dynamics 365 9.0 supports “Not In” \ “Does Not Have” type of queries as an OOTB feature in Advanced Find. In previous versions of Dynamics 365 had no this feature but there were some custom solutions to facilitate this problem.

The problem in previous versions : 

This post (“Not In” \ “Does Not Have” Query in Dynamics CRM – By Cobalt) explains the problem and it describes a solution for the problem for previous versions.

The solution in 9.0 :

The scenario is to query all the accounts which have no cases under in each account.  Following query returns the expected results using advanced find without installing any third party components.

“Does Not Contain Data” Clause

AdvancedFindNotInQuery

The above advanced find query doesn’t allow users to select any more attributes from the cases as it looks for accounts which have no cases. It’s very logical to restrict the user to filter values from the cases when “Does Not Contain Data” option is selected. Continue reading “Advanced Find – “NOT IN” Query is Supported in v9.0″

Dynamics 365 : Promote to Admin

Promote to Admin feature allows any user in Dynamics 365 to make himself an Administrator in the system if the user is authorized from the Admin Center.

Usually when you create an online instance of Sales/Customer Service by yourself but you won’t be able to see most of the admin settings.

promotetoadmin2

If any user has been granted the admin priveledges from the admin center, but that user has no system admin roles assigned (under manage roles) in Dynamics 365, then this feature is useful for getting the System Administrator user role back.

promotetoadmin1

 

Promote to admin is one of the options that you can use in order to gain the admin priveledges. It will add “System Administrator” user role to the user.

Dynamics 365 – Teams: AddMembers/RemoveMembers VS Associate/Disassociate

How to capture adding or removing members to CRM teams? What is the plugin step to capture adding/removing members to a CRM team? AddingMembers/RemovingMembers steps or Associate/Disassociate steps can be used in the plugin?

Following messages are supported for teams in plugin registrations.

TeamPluginMessages

AddMembers/RemoveMembers

A plugin has been created and registered under the messages of AddMembers/RemoveMembers for the Team entity. Members have been added/removed from /to CRM teams, but no plugin was triggered. Then another plugin was registered with Associated/Disassociated steps under CRM teams. Continue reading “Dynamics 365 – Teams: AddMembers/RemoveMembers VS Associate/Disassociate”

Dynamics 365 – Copy Price List

Price List is a member of Product Catalog in Dynamics 365. The same product can have different prices depending on the geographical area, season, membership/customer level etc… A price list may contain all the prices (Price List Items) for a given set of products during a time period in Dynamics 365.

Product Price List 2016 Price List 2017
Product 1 10
Product 2 20
Product N

Having a large number of products under a price list means, there are many price list items associating with them. Whenever a new price list is added to Dynamics 365, Continue reading “Dynamics 365 – Copy Price List”

Dynamics 365 – Developer Toolkit & Extensions for VS2017

Microsoft Dynamics 365 Developer Toolkit and Dynamics CRM & 365 Developer Extensions are great Dynamics 365 development accelerators available in the Visual Studio Marketplace. Still, these tools are not compatible with Visual Studio 2017, which is the latest release of VS. This is a workaround that you can make use of these tools with Visual Studio 2017.

Dynamics 365 Developer Extensions is a great replacement for Dynamics 365 Developer Toolkit, steps of the workaround has been given below for both the tools.

Step 1: Download  Toolkit or Extensions from following links.

Microsoft Dynamics 365 Developer Toolkit

https://marketplace.visualstudio.com/items?itemName=DynamicsCRMPG.MicrosoftDynamicsCRMDeveloperToolkit

Dynamics CRM & 365 Developer Extensions

https://marketplace.visualstudio.com/items?itemName=JLattimer.DynamicsCRMDeveloperExtensions

Step 2: Extract the .vxis file as follows.

Extracting Microsoft Dynamics 365 Developer Toolkit vxix file Continue reading “Dynamics 365 – Developer Toolkit & Extensions for VS2017”

Dynamics 365 + CTI / IVR Integration

What is CTI / IVR?

Computer Telephony Integration, CTI enables computer systems to interacts with the telephone system. There are two main forms of CTI which are Outbound dialing and Inbound call handling.

Interactive Voice Response, IVR is a well-known technology which allows computer systems to interact with humans through the use of voice and DTMF(Dual Tone Multi-Frequency) tones input via the keypad.

How does it work?

Simply, when a customer communicates with a customer care service using the telephone, IVR system can interact with the customer to verify information during the call. This can be Outbound or Inbound, but most organizations use IVR only for handling Inbound calls. Continue reading “Dynamics 365 + CTI / IVR Integration”

Xrm.Utility : openEntityForm with Parameters

Using “openEntityForm” a CRM form can be opened. While it is opening, different form fields values can be populated and those values can be passed to the form.
Xrm.Utility.openEntityForm(name,id,parameters,windowOptions)
name: Entity Logical Name
id: Record id
parameters: Form id, Field Ids, and Values, Custom query string parameters
windowOptions: Flag to open as a New Window

Passing Parameters and Populate Field Values in a New Contact Form

function openNewContact() {
var caseId = Xrm.Page.data.entity.getId();
var title = Xrm.Page.getAttribute(“title”).getValue();
    var windowOptions = {
openInNewWindow: true
};
var parameters = {};
parameters[“new_caseid”] = caseId;
parameters[“new_caseidname”] = title;
Xrm.Utility.openEntityForm(“contact”, null, parameters, windowOptions);
}

Continue reading “Xrm.Utility : openEntityForm with Parameters”

“Not In” \ “Does Not Have” Query in Dynamics CRM – By Cobalt

In Dynamics CRM Advanced Find, Querries can be built for various conditions \ for various filter criteria. But, “Not In” type queries cannot be built and it doesn’t work with OOTB querying. Cobalt has a cool feature which allows users to make “Not In” \ “Does Not Have” types of queries in Advanced Find and for Views.

The Problem:

One Account can have many Cases. Dynamics CRM can display all the “Accounts which has Cases” in Advanced Find\Views. But, Dynamics CRM cannot display all the “Accounts which has no Cases” using Advanced Find\Views.

query1

Solution:

Use “Does Not Contain Data” clause for filtering Continue reading ““Not In” \ “Does Not Have” Query in Dynamics CRM – By Cobalt”