Microsoft Business Applications Blogposts, YouTube Videos and Podcasts
Helping Businesses with Technology

Scenario : Account Records don’t have a email value from primary contact’s record.
So I have chosen to write a plugin to bulk update.
====================================================================
Plugin Registration tool steps:
Message: Update
Primary Entity : Account
Filtering attributes : address1_city
event: post-opeartion
execution mode: Asynchronus
deployment: Server
I have registered asynchronous mode as the system will have performance impact if it is selected as Synchronous mode and it will time out after 2 min, as in my case , I am using dynamics 365 online.
We can increase time limit of plugin if it is dynamics 365 onpremise.
I hope this helps:-)
Cheers guys….
Follow the Brain Illand:
https://community.dynamics.com/enterprise/b/dynamics365fordevelopers/archive/2017/03/07/install-dynamics-365-developer-toolkit-with-visual-studio-2017
I Hope this helps:-)⠿
1) Create two fileds
a) DOB,
b) AGE
2) Calculate AGE based on DOB selected..
So we need to write a simple custom workflow as follows:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;
using System.Activities;
using Microsoft.Xrm.Sdk.Workflow;
namespace CustomWorkflowActivity
{
public class CalculateAge : CodeActivity
{
[Input(“Date of Birth”)]
public InArgument<DateTime> DOB { get; set; }
protected override void Execute(CodeActivityContext context)
{
ITracingService tracingService = (ITracingService)context.GetExtension<ITracingService>();
IWorkflowContext workflowContext = (IWorkflowContext)context.GetExtension<IWorkflowContext>();
IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)context.GetExtension<IOrganizationServiceFactory>();
IOrganizationService service = serviceFactory.CreateOrganizationService(workflowContext.UserId);
DateTime dtDOB = DOB.Get(context);
int CalculateAge = Convert.ToInt32(DateTime.Now.Subtract(dtDOB).TotalDays)/365;
Age.Set(context, CalculateAge);
}
[Output(“Age”)]
public OutArgument<Int32> Age { get; set; }
}
}
Jukka Niiranen blog post below:
http://survivingcrm.com/2013/08/your-essential-toolkit-for-microsoft-dynamics-crm/