Invalid Action – The selected action was not valid

The other day while working on Dynamics CRM 2015 and one of the users came up to me saying everyone is getting a weird error trying to open CRM “Invalid Action – The selected action was not valid”.

Without wasting any further time, went ahead and opened the Front End Server and logged into the event viewer, which was logging the following error and the source was MSCRMKeyGenerator

CrmWRPCTokenKey
CrmKey(Id:, ScaleGroupId:, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:05/27/2015 06:31:05,
ExpiresOn:06/29/2015 06:31:05, CreatedOn:05/27/2015 06:31:05, CreatedBy:NT AUTHORITY\NETWORK SERVICE
CrmKeySetting(Id:, KeyType:CrmWRPCTokenKey, KeyLength:128, KeyGenerationInterval:720, KeyTimeToLive:792,
CryptoTimeToLive:72, Algorithm:HMACSHA256, ArchiveLength:1, Enabled:True,
ActiveKeys:[ScaleGroupId=,ActiveKeyId=])

This error usually means that the Async service (maintenance) has not performed its task, mainly for two reasons

  • Service is not running
  • Service is not able to start due to login issues or any other issue

What’s the fix?

It is very simple, all you need to do is just check that the Microsoft Dynamics CRM Asynchronous Service (maintenance) is up and running. If it is stopped, go ahead and enable it.

  1. Go To Run and type services.msc
  2. Look for Microsoft Dynamics CRM Asynchronous Service (maintenance) and press the Start button or Right Click service name and select Start

If you still see this error then there is an additional thing you can try. Basically, renew the key manually and you should be fine. To do this, open Command Prompt

  1. Go to installation directory of Dynamics CRM, typically it would be %PROGRAMFILES%\Microsoft Dynamics CRM
  2. Navigate to the tools directory
  3. Run the command Microsoft.Crm.Tools.WRPCKeyRenewal.exe /R
  4. CRM should be good now.

Clear field value in Business Rule CRM 2015 Update 1

With the introduction of Business Rules in CRM, it is now very easy for end users (non-developers) to perform simple tasks like Set value, show/hide field, etc based on conditions without writing any code. Previously these simple tasks were performed by developers using JavaScript.

Having said that, Business Rules also came with some limitations, one such limitation is the inability to clear field value. Lots of feedback’s were provided and finally the developers have listened and they have introduced this functionality in the latest update i.e. CRM 2015 Update 1.
Continue reading

FormType based Business Rules in CRM 2015

Ever been in a situation where you need to write a JavaScript code to show/hide, Enable/Disable or set certain field on the form, am sure there were a lot. The dev’s at Microsoft eased up this task by introducing the concept of Business Rules, but did you ever wondered what if all this needs to be done based on the form type?

Let’s say you want to show certain field if the FormType is Create or Update, unfortunately the first thing that will come to mind is that this cannot be achieved using Business Rules.

Today I’m going to show you a little/neat trick which will allow you to do this without writing a single piece of JavaScript code.
Continue reading