Showing posts with label CRM 2016. Show all posts
Showing posts with label CRM 2016. Show all posts

Sunday, 4 December 2016

Limitations of Voice of the Customer in Dynamics CRM

Hi,

Here are the limitations of Voice of the Customer in Dynamics CRM.

Voice of the Customer for Microsoft Dynamics 365 has the following limitations designed to optimize performance:
  • You can publish a maximum of 200 surveys.
  • You can include a maximum of 250 questions on a survey. If you've enabled feedback for a survey, you can include a maximum of 40 questions.
  • You can create a maximum of 25 pages per survey.
  • You can send a maximum of 10,000 email invitations that include piped data in a 24-hour period. Any emails that exceed that amount will remain pending during that time and will automatically start sending when the time limit is over.
  • Voice of the Customer for Microsoft Dynamics 365 will pull a maximum of 2,400 survey responses per day.
  • Voice of the Customer for Microsoft Dynamics 365 allows storage of a maximum of 1,000,000 survey responses.
Hope this helps.
--
Happy CRM'ing
Gopinath


Voice of the Customer in Dynamics CRM

Voice of the customer is a new Dynamics CRM 2016 feature that was introduced to capture feedback regarding the business products or service from CRM. With Voice of the customer we can easily set up Surveys in Dynamics CRM and use the responses for the business growth.

Here are the steps for installing Voice of the Customer in CRM.

1. Sign in to https://portal.office.com with your Global administrator or Dynamics 365 System Administrator credentials. 
2. Click Admin centers > Dynamics 365
3. Click the Instances tab, and then select the instance to add the solution to.
4. Click Solutions.
5. Select the Voice of the Customer and click Install. Proceed through Terms of service to accept the terms.
The status for the solution changes to Installation pending.
The status for the solution will change to Installed when the solution is ready.

After you've installed the Voice of the Customer for Microsoft Dynamics 365 preferred solution, you need to accept the terms and conditions to configure it in Dynamics 365.

1. Go to Settings > Customizations.
2. Click Solutions.
3. In the list of available solutions, select Voice of the Customer for Microsoft Dynamics 365.
4. In the Voice of the Customer for Microsoft Dynamics 365 Configuration screen, select I agree to the terms and conditions and click Enable Voice of the Customer for Microsoft Dynamics 365.

When the configuration completes, you can start using Voice of the Customer for Microsoft Dynamics 365 surveys.

Once configuration is success, you will see a Voice of the Customer added to your CRM Ribbon in Site Map
To create new survey record, navigate to Voice of the Customer --> Survey and create new record.
There are 3 forms on the Survey Record
1) Survey
2) Designer
3) Dashboard
Survey
This form has all themes, behavior controls as well as question/response configuration and users can modify these as required.

Designer
This page allows you to design UI for the survey. It provides options to pages, questions and ratings etc.
Users can design Welcome Page which will shown on opening the survey.

After this users can add question via the drag and drop editor. Users can double click on the form for more editing options.

Dashboard
Dashboard shows the statistical information by submission of feedback with invitation link which is generated in Survey activity (Will come to about this in few seconds)

Publish the Survey Record.

Open any contact/account in CRM and in the Social Pane you will an activity with name as Survey Activity.
Fill all related fields data of Survey activity and click on Save. Once save, the system will generated the survey invitation link that can be sent to the user for providing feedback.

Users can provide feedback by opening the link.


In CRM, users can find the Survey Response by navigating to the Survey Response entity within Dynamics CRM or from the related Survey Response for Survey Activity.
Hope this helps.

--
Happy CRM'ing
Gopinath

Sunday, 23 October 2016

Delete Components by Importing Solutions in CRM 2016

Hi,

Many times we have a situation and thought of deleting Components from a Managed Solution using Solution Import.

Here is the example scenario

"I have a field in an entity.  After deploying a managed solution to production, we decided we don’t need that field any longer.  I removed it from my development environment.  When I deploy an updated version of managed solution in production, the old field is still there."

Now it is possible with CRM 2016 by Cloning a Solution and here are the steps for the same.

I have a created a solution with two entities in it. This is my original Solution.


1) DeleteThis
2) MyEntity


Export the solution and import to the Target CRM Instance.

On Source Instance, select the solution and click on Clone Solution. Just before click that, note down the version of the solution.

Once you click on Clone Solution, it gives a popup where Version is auto incremented. Click on Save.
The existing solution will be over-ridden by the cloned solution with change in the version.

Open the cloned solution and delete the entity/components which you want. I have deleted "DeleteThis" entity from the solution.
Export the Managed Solution and import to Target Instance.
While Importing you will get screen as below. Select Stage for upgrade checkbox as we are upgrading the solution.
After import, you see CRM 2016 will create a solution named same as your solution, but with a suffix '_Upgrade'.


Click on Apply Solution Upgrade button. It will take couple of minutes and CRM will automatically manage to delete the component for you, and at successful completion of this step, you will only have one final solution. The entity/component which you have deleted will be no longer be exists on the destination instance.



Hope this helps.
--
Happy CRM'ing

Gopinath

Friday, 7 October 2016

Prepare Client Customizations

Once you publish customizations, the first user to start one of the CRM mobile apps or the interactive service hub can experience performance issues, because their sign in prompts CRM to prepare the metadata package for download. That means the first user should wait for both the metadata package preparation and the download (subsequent users only should wait for the download).


With Dynamics CRM 2016 Update 0.1 or later, you can improve performance for that first user by clicking the Prepare Client Customizations button after publishing your customizations. This prompts CRM to prepare the metadata package right then instead of waiting for the first user to start a mobile app or the interactive service hub.

Hope this helps.

--
Happy CRM'ing
Gopinath

Thursday, 6 October 2016

Sub Grid client side scripting - CRM 2016

In MS CRM 2016, and Online there are new subgrid related methods added for client side scripting./span>
For subgrid, now we can add event handler for OnLoad. OnLoad event runs every time when subgrid refreshes or when clicking on column heading.
OnLoad Events are addOnLoad and RemoveOnLoad

Xrm.Page.getControl("Opportunities").addOnLoad(OpportunityGridOnloadFunction);
Xrm.Page.getControl("Opportunities").RemoveOnLoad(OpportunityGridOnloadFunction);
To use addOnLoad or RemoveOnLoad you need to get object of grid and then add event handler.
There are some methods to access data from grid.

getRows – gives all rows in the grid
getSelectedRows – gives only selected rows in grid
getTotalRecordCount – gives total number of records in grid.

We can also get Grid Columns, Entityname, Entity Reference, RecordId, Primary Attribute Value
Here is the sample code.

getSubGridRowData = function () {
    //Get Sub Grid object
    var oppSubGrid = Xrm.Page.getControl("Opportunities").getGrid();
    //Get sub grid rows
    var gridRows = oppSubGrid.getRows();
    //  var gridRows = oppSubGrid.getSelectedRows();
    //loop through each row to get values of each column
    gridRows.forEach(function (row, i) {
        var gridColumns = row.getData().getEntity().getAttributes();
        //EntityName
        var entityName = row.getData().getEntity().getEntityName();
        //Entity reference - return type is Lookup object
        var entityReference = row.getData().getEntity().getEntityReference();
        //Record Guid
        var recordId = row.getData().getEntity().getId();
        //Primary Attribute, e.g. for account primary attribute is name, it will return value for name attribute in grid row
        var PrimaryAttributeValue = row.getData().getEntity().getPrimaryAttributeValue();
        //loop through each column in row
        gridColumns.forEach(function (column, j) {
            var atrName = column.getName();
            var atrValue = column.getValue();
        });
    });
}


Hope this helps

--

Happy CRM'ing
Gopinath

Wednesday, 13 July 2016

Solution Segmentation - Add only required things to the solution in CRM 2016

Hi,

Today, I have started working on CRM 2016 and got a chance to explore Solution Enhancements. Most of the times we wanted to include only the changes we did in an entity in the solution instead of including entire solution just for a small change. For example, you have added a field to the contact entity etc...

Till CRM 2015 we have to import complete Contact entity in the target environment.  The problem with this is when we add the contact entity, all the fields, forms, relationships, keys and etc.. even thought we are expecting only one field change..

In CRM 2016, we can do this. For example, if we have made changes to a field and we want to move this change to target environment.

Here are the steps to include only the changes we did on the entity.

Create a Solution.
Click on Add Existing and select Contact entity.
You will be popped with a window to select Forms, Views, Charts, Fields etc..
That's the magic, now you can navigate through each of the tabs and just select the components you have changed.
If you expand and see the components, you will see only the things which are added by you but the complete entity information.

Suppose If you forget to some of the components in the same entity, you can click on 'Add SubComponents' and the required things to the same solution.

You can also choose whether you would like to add Entity Metadata by checking the Flag on the window. When this checkbox is checked it will add all the metadata information in the XML like EntityColor, AuditEnabled etc.. you can see all the details in the XML file.

Hope this helps.
--
Happy CRM'ing

Gopinath

Wednesday, 6 July 2016

Retrieve record using Web API – CRM 2016

Hi,

We all know with CRM 2016 we should use Web API instead of oData in JavaScript. Here is the sample code for creating a record using Web API.


function getPrimaryContact() {
    var clientUrl = Xrm.Page.context.getClientUrl();
    var req = new XMLHttpRequest();
    req.open("GET", encodeURI(clientUrl + "/api/data/v8.0/contacts?$select=fullname,emailaddress1&$filter=fullname eq 'I am the Primary Contact'"), true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.onreadystatechange = function () {
        if (this.readyState == 4 /* complete */) {
            req.onreadystatechange = null;
            if (this.status == 200) {
                var data = JSON.parse(this.response);
                var dat = data.value;
                // Loop through ‘Contact’ result set
                for (var i = 0; i < dat.length; i++) {
                    // Get ‘Contact ID’ from Contact record.
                    var contactId = dat[i].contactid;
                    var emailAddress = dat[i].emailaddress1;
                    if (contactId) {
                        Xrm.Utility.alertDialog("Email Address : " + emailAddress);
                        // Xrm.Utility.alertDialog("Contact ID : " + contactId);
                    }
                }
            }
            else {
                var error = JSON.parse(this.response).error;
                alert("Error retrieving contact – " + error.message);
            }
        }
    };
    req.send();
}

Hope this helps.
--
Happy CRM'ing

Gopinath

Monday, 4 July 2016

Create record and its related record using Web API – CRM 2016

Hi,
We all know with CRM 2016 we should use Web API instead of oData in JavaScript. Here is the sample code for creating a record using Web API.This has some good things, we can create the related records and set them as look up values if we do not have the values.

function createAccount() {
    var clientUrl = Xrm.Page.context.getClientUrl();
    var req = new XMLHttpRequest()
    req.open("POST", encodeURI(clientUrl + "/api/data/v8.0/accounts"), true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Prefer", "odata.include-annotations=*");

    // Set Account Object
    var objAccount = {};
    objAccount.name = "My Account";
    objAccount.creditonhold = false;
    objAccount.accountcategorycode = 1;
    objAccount.revenue = 123456;
    // account["abc_approvaldate"] = new Date();

    // Create new Contact and Set as ‘Primary Contact’
    objAccount.primarycontactid = {};
    objAccount.primarycontactid.firstname = "I am the Primary";
    objAccount.primarycontactid.lastname = "Contact";

    // Set existing Contact as ‘Primary Contact’
    // objAccount[‘primarycontactid@odata.bind’] = "/contacts(" + { contact GUID } + ")";

    //convert JSON object to string
    var body = JSON.stringify(objAccount);


    req.onreadystatechange = function () {
        if (this.readyState == 4 /* complete */) {
            req.onreadystatechange = null;
            if (this.status == 204) {
                var accountUri = this.getResponseHeader("OData-EntityId");
                // Get Account GUID
                var accountID = accountUri.split(/[()]/);
                accountID = accountID[1];
                Xrm.Utility.alertDialog("Created Account ID : " + accountID);
            }
        }
    };
    req.send(body);
}


Hope this helps.
--
Happy CRM'ing
Gopinath