Start here

Dependent Attributes in JavaScript in Dynamics 365 V9.0

Introduction:

Is Form Scripting a dreadful task, given the uncertainty that no one knows when the necessary attribute(s) for our script will be taken down from the form or it’ll be deleted completely?

Well! With Dynamics 365 9.0, we can avoid these situations in a finesse way.

Apart from the ability to handle the dependent JavaScript as described here, there is another feature which enables us to define the dependent attributes.

Define Dependent Attributes in JavaScript:

By tagging a dependent attribute(s) to the JavaScript, we don’t have to worry about the attribute being or not being on the form.

Also, by tagging a dependent attribute(s) to the JavaScript, Dynamics 365 V9.0 internal mechanism makes sure that the attribute(s) cannot be deleted. It shows the below error while attempting a delete.

Dependent Attributes in JavaScript in Dynamics 365 V9.0

How to add dependent attribute(s)?

1. Open the JavaScript that needs to be tagged with Dependent Attribute(s).

2. Select Dependencies tab.

Dependent Attributes in JavaScript in Dynamics 365 V9.0

3. Go to the below table and add the Dependent Attribute(s).

Dependent Attributes in JavaScript in Dynamics 365 V9.0

Lo! We can develop scripts without the dread of attribute(s) getting removed from the form and, hence, our logic going south.

Conclusion:

  • After tagging the attribute to a JavaScript, it is not required to have the attribute on the form and still, we can use the value of the attribute.
  • Tagging also makes sure that the attribute cannot be deleted.

Easily Export Dynamics 365 Reports in PDF, Word, or Excel

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2BsL0oY
via IFTTT

Read Formatted values using LINQ Queries in Dynamics 365

Recently we had a business requirement where we came across an issue while retrieving formatted values using LINQ.

In this blog, we will discuss how to resolve this issue.

Suppose, we want to retrieve a revenue with currency symbol in the formatted value and we are using below query:

//Retrieve Account List with Name & Revenue
 var accountList = (from acc in _context.CreateQuery("account")
                      select new
                      {

                accName = acc.GetAttributeValue<string>("name"),

               revenue = acc.FormattedValues.Contains("revenue")? acc.FormattedValues["revenue"]: "No Data"

                                   }).ToList();

 It seems to be correct, but it fails to retrieve the revenue value with a currency symbol.

Instead, we were just getting “No Data” as the value which we have set if no revenue value found.

After some research and play around we found that the FormattedValues are not returned directly as shown above.

For that we needed to change the query to:

//Retrieve Account List with Name & Revenue
   var accountList = (from acc in _context.CreateQuery("account")
                        select new
                      {

                        accName = acc.GetAttributeValue<string>("name"),

              revenueField = acc.Attributes.Contains("revenue") ? acc["revenue"] : null,
         revenue = acc.FormattedValues.Contains("revenue") ? acc.FormattedValues["revenue"] : "No Data"

                                   }).ToList();

And then it worked!

Conclusion:

If we need to retrieve a Formattedvalue using LINQ, then we first need to read the attribute value, and then we may read the FormattedValues later in the query for that attribute.

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2C0Gzi4
via IFTTT

Monitor user actions in Dynamics CRM on a Daily, Weekly or Monthly Basis

Microsoft Dynamics CRM is a powerful application that can significantly improve the productivity of an organization. To realize the true potential of the application, it is essential to know how the users are adopting Dynamics 365.

The first step to improve the user adoption of the application is to educate the users about the benefits of the application. After educating and training the users, the next step is to monitor their activity in the application to track the usage of the application and identify the need for further training.

This is where a productivity solution like User Adoption Monitor comes into the picture!

User Adoption Monitor enables managers to track and monitor the user activity in Dynamics CRM and improve the user adoption of Dynamics 365.

Monitoring Dynamics 365 user adoption on a Daily, Weekly or Monthly basis:

For better analysis managers can configure the results to be summarized by daily, weekly or monthly basis. Once the User Adoption Monitor solution is installed and activated, a User Adoption Configuration record is automatically created.

User Adoption Monitor helps you to configure tracking on the below operations. User can track OOB as well as custom entities.

  • Lead – Create
  • Lead – Closed
  • Account – Create/Update
  • Phone Call – Closed
  • Appointment – Closed
  • Opportunity – Create
  • Opportunity – Won

Activity Tracking Dynamics CRM

On the same screen, you can also specify, which actions need to be tracked per entity in a customized manner. Just click on the red circle (O) for the period you would like the tracking information to be summarized by. Let us understand what these terms None, Daily, Weekly, and Monthly specifies;

User Adoption Dynamics CRM Utility

The user can also use this tracking data for creating visualizations using OOB charts and have them presented in Dynamics CRM Dashboards.

Dynamics CRM User Adoption Tracker

By monitoring the daily actions of Dynamics CRM users, managers can then motivate them to be more active on Dynamics 365 thus increasing overall productivity and efficiency of the organization.

User Adoption Monitor is a productivity solution that helps the organization to track and review the CRM actions performed by users and improve the user adoption of the application. Managers and administrators can make strategic decisions about training and improve business processes to increase the user adoption of CRM based on the insightful utilization reports provided by the tool. It is available for Dynamics CRM 2013 & above on-premises, partner hosted, Dynamics 365, V9.0

Get started with User Adoption Monitor! Download your free trial from our Website or Microsoft AppSource.

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2zZgkrt
via IFTTT

Create Month or Year Only Field in Dynamics 365

Introduction:

A lot of time we come across the situations where we would need to have one field to store just the Month part of the date and another one to store the Year part of the date. For example, Credit or Debit Card validity period where the user has to select Month and Year. In such cases, we could create one optionset field with options to select Month and number field to enter the year. In some scenarios, we create one Date only field and write a script or workflow to take the month and year part out from the selected date and store it in a separate Month and Year fields.

We have now found a better approach to tackle this kind of situation.

We can use the ‘Auto-Complete’ control for this purpose. The Auto-Complete control was introduced in Dynamics CRM 2016. This control provides suggestions to the user as soon as the user starts typing in the text fields.

Refer this article to know more about Auto-Complete control introduced in Dynamics CRM 2016.

Steps to create a Month and Year only fields using the Auto-Complete control:

1. First, create two text fields namely, ‘Month’ and ‘Year’.

2. Place these two fields on the entity form

Create Month or Year Only Field in Dynamics CRM

3. Now, write a script to make these two fields act as an autocomplete and bind month and year collection to Month and Year field respectively.

Month collection:

var months = [
    { name: 'Jan', code: '01' },
    { name: 'Feb', code: '02' },
    { name: 'Mar', code: '03' },
    { name: 'Apr', code: '04' },
    { name: 'May', code: '05' },
    { name: 'June', code: '06' },
    { name: 'Jul', code: '07' },
    { name: 'Aug', code: '08' },
    { name: 'Sep', code: '09' },
    { name: 'Oct', code: '10' },
    { name: 'Nov', code: '11' },
    { name: 'Dec', code: '12' }
      ];

Year collection :

//get the start year as current year – 2 year
    var startYear = (new Date()).getFullYear() - 2;
    //get the end year as current year + 15
    var endYear = (new Date()).getFullYear() + 15;

    var yearList = [];
    //loop though endyear
    for (i = startYear; i <= endYear ; i++) {
        var obj = {};
        //set name for object array
        obj["name"] = i.toString();
        //set code for object array
        obj["code"] = i.toString();
        // insert into object array
        yearList.push(obj);
    }

This list is going start from the last two years from the current year and will end with next 15 years from the current year.

For example, if the current year is 2017 then the autocomplete suggestion list will show the list years start from 2015 to 2024. You can use your own logic to create the year list.

4. Call suggestMonth function on a load of form.

var suggestMonths = function (attributeName) {

    var    months = [
  { name: 'Jan', code: '01' },
  { name: 'Feb', code: '02' },
  { name: 'Mar', code: '03' },
  { name: 'Apr', code: '04' },
  { name: 'May', code: '05' },
  { name: 'June', code: '06' },
  { name: 'Jul', code: '07' },
  { name: 'Aug', code: '08' },
  { name: 'Sep', code: '09' },
  { name: 'Oct', code: '10' },
  { name: 'Nov', code: '11' },
  { name: 'Dec', code: '12' }
    ];

    var keyPressFcn = function (ext) {
        try {
            var userInput = Xrm.Page.getControl(attributeName).getValue();
            resultSet = {
                results: new Array(),
                commands: {
                    id: "sp_commands",
                    label: "Learn More",
                    action: function () {
                    }
                }
            };

            var userInputLowerCase = userInput.toLowerCase();
            for (i = 0; i < months.length; i++) {
                if (userInputLowerCase === months[i].name.substring(0, userInputLowerCase.length).toLowerCase()) {
                    resultSet.results.push({
                        id: i,
                        fields: [months[i].name]
                    });
                }
                if (resultSet.results.length >= 10) break;
            }

            if (resultSet.results.length > 0) {
                ext.getEventSource().showAutoComplete(resultSet);
            } else {
                ext.getEventSource().hideAutoComplete();
            }
        } catch (e) {
            // Handle any exceptions. In the sample code,
            // we are just displaying the exception, if any.
            console.log(e);
        }
    };

    Xrm.Page.getControl(attributeName).addOnKeyPress(keyPressFcn);
};

 5. Call suggestYear function on load of form.

var suggestYear = function (attributeName) {
    // var getCurrentYear = +15;
    //get the current year -2 i.e starting year
    var startYear = (new Date()).getFullYear() - 2;
    //get the current year +15 i.e End year
    var endYear = (new Date()).getFullYear() + 15;

    // List of sample account names to suggest
    var yearList = [];
    //loop though endyear
    for (i = startYear; i <= endYear ; i++) {
        var obj = {};
        //set name for object array
        obj["name"] = i.toString();
        //set code for object array
        obj["code"] = i.toString();
        // insert into object array
        yearList.push(obj);
    }



    var keyPressFcn = function (ext) {
        try {
            //get input value
            var userInput = Xrm.Page.getControl(attributeName).getValue();
            resultSet = {
                results: new Array(),
                commands: {
                    id: "sp_commands",
                    label: "Learn More",
                    action: function () {
                        
                    }
                }
            };
            //get user input value and convert inyo lower case
            var userInputLowerCase = userInput.toLowerCase();
            //loop thought the array list
            for (i = 0; i < yearList.length; i++) {
                //match the list with inputed value
                if (userInputLowerCase === yearList[i].name.substring(0, userInputLowerCase.length).toLowerCase()) {
                    resultSet.results.push({
                        id: i,
                        fields: [yearList[i].name]
                    });
                }
                //display matching list upto 10
                if (resultSet.results.length >= 10) break;
            }

            //set list if greater then 0
            if (resultSet.results.length > 0) {
                //set auto complete list
                ext.getEventSource().showAutoComplete(resultSet);
            } else {
                ext.getEventSource().hideAutoComplete();
            }
        } catch (e) {
            // Handle any exceptions. In the sample code,
            // we are just displaying the exception, if any.
            console.log(e);
        }
    };

    Xrm.Page.getControl(attributeName).addOnKeyPress(keyPressFcn);
};

6. This way our standard text fields becomes auto-complete fields and will start showing the suggestion for month and year as soon as user starts typing as seen in the screenshot below;

Month:

Create Month or Year Only Field in Dynamics CRM

Year:

Create Month or Year Only Field in Dynamics CRM

7. Then finally add the validation code on change of these two fields so that the user cannot enter values other than the values present in the auto-complete list.

Create Month or Year Only Field in Dynamics CRM

Note: Supported versions of this solution are CRM 2016 and above.

Conclusion:

Using the above-mentioned steps, the user can make use of auto-complete control feature of Dynamics 365 to create Month and Year only field.

QuickBooks and Dynamics CRM Integration

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2ABhg6P
via IFTTT

Reports Enhancements in Dynamics 365 V9.0

Introduction:

Reports are great for conveying information to those who may not have access to or don’t use the CRM system regularly. Organizations use reports in their day to day work, and sometimes need to print the reports to present the hardcopy at meetings.

Reports have now received some significant enhancement in the latest Dynamics 365 v9.

Print Report Option:

When you run the reports in Dynamics 365 v9, you can now see the ‘Print’ option on the right-hand side as seen in the screenshot below;

Reports Enhancements in Dynamics 365 V9.0

Using the Print option, the user can directly print the reports in Dynamics 365 v9.

Let’s create a Quote and click on Run Report. The Report would open and then click on Print as shown below;

Reports Enhancements in Dynamics 365 V9.0

After clicking on Print, a popup window appears that asks the user to select the Page size and Page orientation (‘Portrait’ or ‘Landscape’). Once the desired Page size and Page orientation are selected, click on Print.

Reports Enhancements in Dynamics 365 V9.0

After clicking on Print, the above screen will appear, and now you are ready to print the report directly instead of downloading it in PDF and then printing.

Save Report as PowerPoint option:

In addition to the Print option, the users can now save the reports as PowerPoint presentation.

To save the report as a PowerPoint presentation, the user simply needs to click on ‘Save as’ option on the report, select ‘PowerPoint’ and save the report.

Reports Enhancements in Dynamics 365 V9.0

Quote report in PowerPoint would look as shown in the below screenshot;

Reports Enhancements in Dynamics 365 V9.0

Conclusion:

With these new additions, users can reduce the number of clicks and directly print the reports or save it as a PowerPoint presentation to effortlessly share the reports or present it in meetings.

Copy System and Custom Entities in Dynamics CRM

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2nsoKpx
via IFTTT

Loading Dependent JavaScript Files in Dynamics 365 V9

Introduction:

Woahhh!! The Dynamics 365 July update is available for mass.

The latest update has introduced a plethora of new features. Where few of the updates are related to the functionality while other few are related to UI.

The CRM forms are redone, the new UI kind off bears retro look (not everyone would agree on this point).

The UI feels fresh, the sections are properly demarcated and stands out on the form in comparison to the older versions.

The other major introduction is Unified Interface, this can be a path breaking addition to the Dynamics 365 family.

Loading Dependent JavaScript Files in Dynamics 365 V9:

Well! The list of newly added features is quite long though not exhaustive.

The very interesting addition that we saw and which could be a boon for developers is Loading Dependent JavaScript Files.

Did this amaze you? If not, let us explain this a bit deeper and for sure you would be left amazed with this new feature.

Earlier i.e., prior to July 2017 update if we were to create a Form Script library (web resource) and if that library had a reference to a 3rd party library, then it was mandatory for us to have the 3rd party library referred up in the order before our Form Script Library.

Well! This is not a big deal but it could get tedious if you were to add the Form script library on multiple entities and each entity having multiple forms.

Now, let’s see what has been introduced in Dynamics 365 v9.0 to ease this out.

At the time of web resource creation and also for the existing web resources we have the option of defining the dependent web resources.

What this feature does is, allowing you to add the Dependent JavaScript files onto your existing web resource or on a new web resource.

So, on the Web resource form there is a new tab called Dependencies.

Loading Dependent JavaScript Files

Once we are on the Dependencies, we get the option to select dependencies that this web resource needs.

Loading Dependent JavaScript Files in Dynamics 365

This is where we would have to add all the required web resources.

This saves us the extra step of including the additional resources on all the forms.

In the coming post will describe adding Attribute dependencies, so keep visiting this space.

Conclusion:

  • Dependent Files are loaded for scripts on the form and ribbon button.
  • Dependent Files are not loaded for HTML, we still have to refer the files in HTML for the files to work.

Easily Export and Email Dynamics 365 Reports in PDF, Word, or Excel

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2i5sHuW
via IFTTT

Meeting Quarterly Sales & Service Targets with Maplytics

Meeting Quarterly Sales & Service Targets with Maplytics

In this data-driven economy, a Sales or Service Professional’s day is all about numbers. For their organization to be successful, engage more customers, and be ahead of the competition, the Sales and Service Teams set targets and try to achieve or exceed them.

If the long-term goal of an organization is to gain a majority of market share, augment company growth and provide the best customer service, the sales & service reps need to be ultra-efficient and visit as many customers as they can in the shortest amount of time. Even though this goal sounds simple, the sales and service reps are always on a lookout for the right tools that allows them to increase their efficiency and simplifies the execution of the sales strategy.

This is where a complete geo-analytics solution that works seamlessly within CRM comes into the picture!

A mapping solution like Maplytics, which extracts the location insights from Dynamics CRM data, helps the organization to understand, analyze and reach out to more customers. Organizations can visualize the customer base on a map to get an overview of the geographical spread of the customers, density cluster, nearby customer, sales distribution, etc.

With these location-based business insights, the sales and service reps can improve their sales processes and execute the sales strategy efficiently. In addition, as Maplytics is a native Dynamics CRM solution, the sales and service reps can visualize the Dynamics CRM data in real time, update or take action on CRM records, manage all the sales and service related actions right within Dynamics CRM thus reducing the time wasted in switching multiple apps and helping them to focus on their top priority, CUSTOMERS!

Maplytics provides the best in class features that help the sales and service reps to augment customer experience and surpass their sales target. To be very specific, features like Appointment Planner, Route Planner and POI (Point of Interest) Search are beneficial for field reps to be productive on the go!

Let’s see how each of these features can transform the sales process for field reps and helps them to meet quarterly sales targets;

Efficient Appointment Management for better customer satisfaction:

With the built-in Appointment Planner, Maplytics is transforming the lives of thousands of field reps. Sales & service reps can now plan and manage all of their appointments based on priority and ensure that no appointments are missed, ever! Also, as this is all done within Dynamics 365, the Managers can visualize their team appointments, and even assign the appointments to other team members to efficiently distribute the work and maximize sales performance.

Video: https://youtu.be/pfDVHnF4jQg

Route planning and Optimization for enhanced time utilization:

After planning their appointments, the field reps can now create optimized routes to reduce the travel time and increase the number of appointments/service cases/work orders. Even the Managers can create optimized routes to share it with their team members and help the field reps to reach out to maximum customers in the shortest amount of time. Also, with the live traffic data at their disposal, the field reps can ensure that nothing comes in the way of achieving the sales target! That’s not it, if any of the appointments is canceled at the last moment, field Reps can use Maplytics to find nearby customers by distance or travel time and schedule an impromptu meeting to utilize their time slot.

Video: https://youtu.be/LLmHvIKBNeo

Finding nearby POIs to make each visit count:

When on the field, the sales and service reps might need to find nearby points of interest, and this again takes up time as this would require switching between apps. With POI Search in Maplytics, this will never be the case as the field reps can easily locate nearby restaurants, hotels, gas stations from the directory of thousands of Bing Maps geotagged locations, all without ever leaving Dynamics CRM! So, whether they want to meet a customer at a coffee shop, refuel gas on the way to a visit or simply need to find a hotel at out of station visit, it’s a matter of few clicks with Maplytics.

Video: https://youtu.be/LlrWWUHldJY

Maplytics™ is a leading geo-analytical mapping app that provides a seamless Bing Maps and Dynamics CRM integration to empower users with map visualization and routing capabilities within Dynamics 365. It is one of the first mapping solutions to be Certified for Microsoft Dynamics 365 (CfMD). Maplytics allow users to simplify their sales process and get the most out of CRM data with powerful features like Radius Search, Sales Territory Management and Heat Map visualization!

Get started with Maplytics! Download your free trial from our Website or AppSource.

Happy Mapping!

from Microsoft Dynamics 365(CRM) Tips and Tricks http://bit.ly/2AcGHh8
via IFTTT

%d bloggers like this: