Monday, February 19, 2018

Get the Created Records when Lead Gets Qualified - Microsoft dynamics CRM

Hi All,

Once Lead Gets Qualify, as per oob behavior it will automatically create opportunity, contact and accounts.

As per my logic whenever an opportunity gets created need to set created lead id to custom opportunity field.

Plugin Step Creation:


Register Plugin as Asynchronously


            IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
            IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
            OrganizationServiceContext orgContext = new OrganizationServiceContext(service);

EntityReference getLeadid = (EntityReference)context.InputParameters["LeadId"];
Entity lead = service.Retrieve("lead", leadid.Id, new ColumnSet(true));

foreach (EntityReference CreatedEntityFromLead in ((IEnumerable)context.OutputParameters["CreatedEntities"]))
                {
                    if (CreatedEntityFromLead.LogicalName == "opportunity")
                    {
                        Entity entOpportunity = service.Retrieve("opportunity", CreatedEntityFromLead.Id, new ColumnSet(true));
                         entOpportunity["new_customLookupid"] = erLookUpField;
                        service.Update(entOpportunity);
                    }

                }




Tuesday, February 6, 2018

Selection Count Rule - Display Custom ribbon button only if atleast single record is selected in a Home Page

Hi All,

Display Custom ribbon button only if at-least single record is selected in a Home Page

Add the Below Enable Rule to the Custom Created Command and publish it.

Enable Rule:





Monday, February 5, 2018

ILMerge Visual Studio

Hi All,

As we already Known that ILMerge we can use to Merge dll’s, in some situation we can’t find the proper expectation Solution while Surfing. So am writing this blog for my safe and Global if needed.

In below Scinario I need to merger workflow.dll + Newtonsoft.json.dll + strongfile.snk = Workflow_Merged.dll

"$(TargetDir)\ILMerge.exe" "$(TargetDir)Workflow.dll" "$(TargetDir)\Newtonsoft.Json.dll" "/keyfile:$(SolutionDir)Workflow\Workflow.snk" /out:"$(TargetDir)\Workflow_Merged.dll"

Note:
Download ILmerge from : ILMerge
(TargerDir) --> Root Directory
(SolutionDir) --> Solution Directory

How to Import Data from Excel to Multiple tables in PowerApps

Introduction:   I have created a view on how to import data from excel to multiple tables in Canvas PowerApps   Implemented Steps: ...