Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM


Leave a comment

Trigger plugin on Action Execution in Dynamics CRM

Hi ,

I am going  to show in the following steps how to trigger plugin on Action execution in CRM 2013/2015

Steps

1) Create Action

CreateAction

2) Register plugin

RegisterPlugin

3) Call Action

The following code will show how to call the action using C#

OrganizationRequest callActionRequest = new OrganizationRequest("qdrn_setcustomervip");

callActionRequest[“Target”] = new EntityReference(“contact”, {GUID});

OrganizationResponse callActionResponse = service.Execute(callActionRequest);

Advertisements


Leave a comment

Dynamics CRM Common Workflow Activities Library

Hi ,

You can now download the Common Workflow Activities Library and save time by not implementing components repeatedly in each project such as

  • Apply Routing Rules
  • Share Record With Team
  • Check If User is in Role
  • Check If User is in Team

Download Link : https://msdyncrmworkflowtools.codeplex.com/


Leave a comment

Calculate Rollup Fields programatically in CRM 2015

Hi,

Rollup field calculation is done by an async CRM Workflow , however in many scenario you may want to perform run time calculation , the following code illustrate how to invoke the calculation prgroamtically.

CalculateRollupFieldRequest rollupRequest=

new CalculateRollupFieldRequest { Target = new EntityReference(“new_customentity”, entityId), FieldName = “new_rollupfield”};

CalculateRollupFieldResponse response =(CalculateRollupFieldResponse)service.Execute(rollupRequest);


Leave a comment

Export Translations in Dynamics CRM Progrmatillcally

SDKThe following code illustrates how to export Translation file from CRM problematically:

ExportTranslationRequest req = new ExportTranslationRequest();
req.SolutionName = "Final Solution";
ExportTranslationResponse resp = (ExportTranslationResponse)service.Execute(req);
String outputDir = @"C:\CRMTranslaions\";
byte[] exportXml = resp.ExportTranslationFile;
string filename = "CRMTranslations" + ".zip";
File.WriteAllBytes(outputDir + filename, exportXml);
Console.WriteLine("Translations exported to {0}.", outputDir + filename);