Activate-Deactivate Plugins/Process with code

while deploying our customisation to target environment many times we need disable/deactivate plugins and or process. Manually, its straight forward but what about when you are working with DevOps or you cannot touch target environment. In such environment, we need to handle it with code. So for that here are the steps …

Continue reading “Activate-Deactivate Plugins/Process with code”

workflow execution from Plugin

Here is quick sample code for workflow execution from Plugin …

Execute workflow …

Continue reading “workflow execution from Plugin”

LinkEntity issue with ‘Partyid’

Today, I was working with LinkEntity for ‘PartyId’, So I want all appointment where specific account or contact is in the required field and is connected to a specific entity.

Thus, I created 3 appointments on the entity and wrote following query… Continue reading “LinkEntity issue with ‘Partyid’”

Linq Entity with filter

data retrival

Many times we need to joins with filters in one entity or both of them. Here is the simple sample …

Continue reading “Linq Entity with filter”

Error: AliasedValue – Key not found

Key not Found

Error: Key not found in Link Entity QueryExpression (Ref above image). Continue reading “Error: AliasedValue – Key not found”

Working with Goals – Rollup Query

rollup

We can create Rollup Queries using CRM SDK (plugin or workflow or some external tool). In this entity, MS CRM provided similar to advance find capability for Query attribute, CRM stores it in database as ‘fetchxml’ attribute in fetch-XML (XML) format. Continue reading “Working with Goals – Rollup Query”

Common plugin for Deactivate / Delete all associated entity

Its walk-through for deactivating all associated (1:N) records. Steps for that are

  1. Create plugin
  2. Register and create steps

Create plugin

Continue reading “Common plugin for Deactivate / Delete all associated entity”

Trigger plugin using Action

actions

There are many scenarios that we needs to trigger plugin from ribbon / command bar. For this kind of scenario what we do, we create dummy entity and then call some message from JavaScript of  that dummy entity to trigger our plugin (you can explore this example from here ). This is what we do for MS CRM 2011, but from MS CRM 2013 onward, Microsoft CRM introduced ‘Action’ process.

Using Action we can trigger plugin, steps for that are …

Continue reading “Trigger plugin using Action”

MS CRM Plugin debugging

top-debugging-tips

To debug plugin, we have two ways, One is explained in below provided link, I will explain the other.

https://support.microsoft.com/en-us/kb/2778280

Continue reading “MS CRM Plugin debugging”