Menu Close

Blog

Slide 1

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 2

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

Slide 3

Microsoft Business Applications Blogposts, YouTube Videos and Podcasts

Helping Businesses with Technology

previous arrow
next arrow

CONTACT CASE COUNT PLUGIN IN DYNAMICS 365

Contact Case Count  plugin dynamics 365

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;

namespace AdvancedPlugins
{
    public class ContactcaseCount : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            IPluginExecutionContext context = (IPluginExecutionContext)
         serviceProvider.GetService(typeof(IPluginExecutionContext));

            IOrganizationServiceFactory serviceFactory =
                (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
            IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

            ITracingService tracingService =
            (ITracingService)serviceProvider.GetService(typeof(ITracingService));

            // The InputParameters collection contains all the data passed in the message request.

            if (context.InputParameters.Contains(“Target”) && context.InputParameters[“Target”] is Entity)
            {
                Entity contact = (Entity)context.InputParameters[“Target”];

                // getting Contact fullname and its emailaddress

                string name = contact[“fullname”].ToString();
                string email = contact[“emailaddress1”].ToString();

                // we have to get the created contact guid in order to mpa to newly creaing case

                Guid contactid = new Guid(context.OutputParameters[“id”].ToString());

                // Create a new case automatically
                Entity cse = new Entity(“incident”);
                cse[“title”] = “User whose name is ” + name + ” has created new case. Please contact him on hs email: ” + email;

                // lokkup –> refer to anoter table – entityname nad its record id

                cse[“customerid”] = new EntityReference(contact.LogicalName, contactid);

                service.Create(cse);

                // select case of a contact where conact is contactid
                QueryExpression qr = new QueryExpression();
                qr.EntityName = “incident”;
                qr.ColumnSet = new ColumnSet(“customerid”);

                // where conact is contactid
                ConditionExpression ce = new ConditionExpression();
                ce.AttributeName = “customerid”;
                ce.Operator = ConditionOperator.Equal;
                ce.Values.Add(contactid);

                // add cond to query
                qr.Criteria.AddCondition(ce);

                // Exceute query

                EntityCollection caseCollection = service.RetrieveMultiple(qr);


                // update case count on contact – 
                Entity newlyCreatedContact =  service.Retrieve(contact.LogicalName, contactid, new ColumnSet(“spousesname”));

                newlyCreatedContact[“spousesname”] = caseCollection.Entities.Count.ToString();

                service.Update(newlyCreatedContact);



            }
        }
    }
}


Go ahead and check inside crm about the case count on the contact.
I hope this helps..
Share this:

DUPLICATE COLUMN HEADING EXISTS ERROR IN DYNAMICS 365

Hey Guys,

Today i am going to explain how to resolve the error which appear as
 “Duplicate Column Heading Exists” in Dynamics 365.

So how this error appears, when you try to download for example Account Template from Dynamics 365
Settings > Data Management > Template for Data Import >

Click Download the Account Template then the following error appears, Don’t panic ..

Why this error appears don’t think anything just follow me…

So when you get this error, just need to find out any duplicate field names on the Account Entity..

How to find out that .. Go to Settings > Customizations  >  Customize the system > from the default solution > Select the Account Entity and the Fields > sort by Display Name

You will see like the following image….

So you just need to rename the display name to something similar to your requirement then  you are good to go..

Then Publish all customizations .

Go to Template for Data Import  then you should be able to download the template for any new data import for the Account Entity..

I hope this helps..

Share this:

DYNAMICS 365 PLUGIN REGISTRATION TOOL BUG FIXED

Hi Guys,

Just want to make aware of the Dynamics 365 Plugin Registration Tool bug has been fixed by Microsoft on their lastest release of SDK.

Before when we tried to register plugin step on the Dynamics 365 Plugin registration tool we are not able to see the “Register Selected Plugin” or “Close” Buttons.

So this bug have not fixed by Microsoft yet.

So there is a work around to “Register Plugin” by pressing the Tab for 8 times or after step 5 : log press Enter.

Then you will get the pop up with the update or register of the plugin..

Happy CRMing:-)

Share this:

DYNAMICS 365 VERSION 9.0 NEW FEATURES

Microsoft Dynamics 365 Latest Release of version 9.0 features includes as follows:


1)Unified  Client Interface

2)Activity Timeline

3)LinkedIn Sales Navigator

4)Virtual Entities

5)Web Client Refresh

6)Customer Service Hub

7)Multi-Select Option Sets



8)Activity Logging




9)Business Process Flow Enhancements

10)Customer Insights

Share this:

CREATE SURVEY USING VOICE OF CUSTOMER IN DYNAMICS 365

A step by step guide to create survey using voice of customer in dynamics 365

First of all, go to the Admin center in Dynamics 365, Applications area and choose Voice of Customer Application and click install.
After clicking on the install button and it show up with the voice of customer as been installed successfully.


The Voice of the Customer functionality allows you to add theming to your surveys.  
To do so you just navigate to the Images and Themes area of the Voice of Customer 
And from there you can go ahead and create an Image record and upload a logo that you want to use in your survey will be accomplished in later steps.  After you upload the logo and save the record you’ll be able to see a preview of the image.
You can also go to the themes area and create your own logo and i strongly advice you to appoint UX designer to create the logo for your organisation image.

Now you have your image and theme setup, you’re ready to create your survey. 
  • Navigate to Voice of the Customer –> Surveys, and click New to create your new survey.  
  • You’ll see on the survey form that there are a lot of options to configure your survey.
  • We’re not going to cover them all in this post but you’ll notice that the we’re able to apply the Image and Theme we created previously.

In order to actually start building out the survey questions, you need to change from the 
Survey to the Designer form.  You’ll notice that here there’s also the Dashboard form where
you can see statistics about survey responses.  For now we’ll click on Designer and start creating some questions.

On the Designer form, you have the ability to add or delete pages in your survey via the buttons that appear underneath the vertical page layout on the left.  You can’t delete the Welcome or Complete page – 
those are required for all surveys.When in the design mode, you’ll be able to drag question types from the right over onto the main pane in the middle.  When you hover over a question on the page, 
you’ll be able to delete the question, make quick edits inline on the page to the question label, or click the pencil icon to take you to a more advanced editor so you can change more settings for the question other than the label. 

The following code snippet can be placed in the email or link to the website, embed the code with custom code:
[Survey-Snippet-Start]2dfd9f6d-400e-4488-ad18-773357e758ea[Survey-Snippet-End]
You can create  the response routing see the below image.
Something else you can do to add logic to your survey is to create Response Routings.  An example of when you’d use a response routing is if 
you want a customer to fill out an additional question, if they answered a certain way on a previous question.  For example, 
you may ask the customer how they’d rate the experience with your company, and if they provide a low rating, 
you may want to display an additional question to gather more information on why they felt that way.  
To get to response routings, click on the related records dropdown of your survey.

When you setup your response routing rules, you need to create Conditions and Actions for each Response Routing.  
See below how we’re only showing the “Can you please provide us with additional information” question if the user responded 1 to the star rating question.  
Otherwise we don’t show it.

After completing the above, your survey is ready to be published.  If you toggle back to the Survey form, you can click on the Preview button to see 
what the survey would look like to your end users. 
When you’re all set, you can click on Publish so that the survey is now accessible externally.
Share this: