Tuesday, 13 December 2016

MS Dynamics CRM - Organization Insights Dashboard

Organization Insights dashboard is used to view the user based insights/statistics about your instance.

Important Note: This is a preview feature and not for production use.

This is a handy dashboard with 6 inbuilt charts and using the same we can find stats related to active user reads, updates, deletes, changes and retrieves.

Where to get it? Go to Settings => Administration => System Settings => Previews



The charts can show data on three different time frames
  1. 2 hours
  2. 48 hours
  3. 30 Days

The data aggregation frequency is different for different time frames, as per MSDN article the following are the data aggregation frequencies
  1. 2 hours - Updates every 5 mins
  2. 48 hours - Updates every 1 hour
  3. 30 days -  Updates every 1 day
For more Information please refer MSDN article 


Gamification - MS Dynamics CRM

Gamification is a rapidly evolving area in current trends and its closely related to employee engagement and empowerment. This helps to transform work environment into a place where the employee's perform efficiently with fun and enthusiasm.
In this article I will provide a glimpse about the Gamification solution in MS CRM.
Where to get it? Now at CRM Marketplace or at App-source you can add gamification to your Instance.
Gamification - Applying gaming principles and gaming elements(UX) to a process which is not a game [ Example CRM ;) ]
For an example, consider we have multiple customer care teams in our company to manage customer tickets or Sales teams with monthly targets.
In this scenario, we can leverage the way we manage "cases resolved/targets achieved" extensively using gamification to have a positive impact on employee engagement and motivation. On top of everything, this creates a positive wave around the organization to achieve better and makes a fun-filled work environment to attain Win-Win scenario.
Below are the brief info and detailed article links,
Once the app is added to CRM, we need to activate the gamification application by opening the gamification solution in CRM.
After activation, a mail with gamification portal details will be sent.
The Gamification is managed by a user with Gamification role "commissioner". Commissioner can assign roles to other users. Optionally there can be other game admins.
In the gamification portal, you can set up
  1. Game model - No teams, Fantasy Teams, Fixed teams
  2. Sport theme - Football, basketball, hockey, car racing, etc.,
  3. KPI type: Target/Actuals
  4. Start date and End date: The date of start and end for the same
  5. Draft frequency and first roaster period
  6. KPI for the particular game and how the points are calculated.
  7. Players : These are the one's who are going to participate in the game
  8. Fans: Fans are not players, but the users who want to see the game and statistics related to the game. In real world scenarios they can be CEO's, Manager's or Employee's
  9. Awards: The awards for the game and KPI's.
For more info on game setup refer:
You can also create screens for every game and use it for TV streaming using a URL. This is a fantastic feature in my view.
Below is a screenshot of game named "test" which I have configured in my instance. Happy learning guys and feel free to provide feedback on the content.

Sunday, 14 August 2016

JQuery Deffered simple example with WebAPI Calls

Jquery Deferred is a new trend in async JS development which made asynchronous programming more flexible, efficient and powerful. I will share my knowledge around JQuery Deferred in this article in a simple way(hopefully) and please do comment with your feedback.

I will also share a sample HTML file which can be used to play around with deferred in your local machine. I strongly suggest a handson in deffered to master the same and the shared sample can also help to an extent.

Deferred object are used to chain multiple callbacks one after another based on success/failure/other state changes. By using this we can make one async call back wait for another and also we can pass data between callback.

There are many methods available with in deferred object and frequently used are as follows
  • promise
  • resolve
  • reject
  • notify
  • done
  • fail
  • progress
  • always
  • then

Simple intro to Deffered method:
  • When a resolved is exectuted in deferred object the method defenition passed into the deferred object's done will be executed
  • When a reject is exectuted in deferred object the method defenition passed into the deferred object's fail method will be executed
  • When a notify is exectuted in deferred object the method defenition passed into the deferred object's progress method will be executed
  • always will be execute on both resolve and reject
  • then will be called after a state change and it can hold method defenition for done,fail and progress as parameters


Promise:

Promise is almost similar to the deferred object, but the promise of a deferred object cannot be used to change the state of deffered. So Promise can only be used to attach events on state change of deferred.

While developing you might see deffered is used intead of promise or viceversa. So if you want the user not to change the state of deferred then expose promise else expose deffered.

Defered supports all above listed functions while promise will support only done, fail, progress, always and then.


Sample Code Snippet:

Note: This HTML file needs you to be in online to work as expected. This is because of CDN and AP calls we have used.

<html>
<head>
    <script src="https://code.jquery.com/jquery-3.1.0.js" integrity="sha256-slogkvB1K3VOkzAI8QITxV3VzpOnkeNVsKvtkYLMjfk=" crossorigin="anonymous"></script>
    <script>
        // Deferred function that returns a deferred promise. If parameter has value then moves to sucess callback else moves to failure callback.
        function deferredFn(Tempv) {
            debugger;
            var Deferredob = $.Deferred();
            Deferredob.notify("Start");
            var request = new XMLHttpRequest();
            request.open("GET", "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", true);
            request.send();
            request.onreadystatechange = function () {
                if (this.status == 200) {
                    if (Tempv) {
                        Deferredob.resolve("Resolved")
                    }
                    else {
                        Deferredob.reject("failed")
                    }
                }
            }
            return Deferredob.promise();
        }

        // Method to throw output
        function alertResult(input) {
            alert(input);
        }

        // Main method
        function ram() {
            //deferredFn("Test").then(/*done[success]*/alertResult,/*fail[failure]*/alertResult,/*Progress*/alertResult);

            //deferredFn("Test").progress(alertResult);
            //deferredFn("Test").done(alertResult);
            //deferredFn("Test").fail(alertResult);

            deferredFn().always(alertResult);
        }
    </script>
</head>
<body onload="ram()">
</body>

</html>

PS: Will share some articles whenever I find time.

Saturday, 6 August 2016

C# - String Comparison ignore case the best way

As a C# developer, we tend to compare strings more frequently and we always tend to make lot of UpperCase and LowerCase conversions before comparing strings. 

To simply comparision try using "StringComparision.OrdinalIgnore", below is the sample

Code:
String string1 = "Test", string2 = "test";
Console.WriteLine("Strings are similar : {0}",string1.Equals(string2, StringComparison.OrdinalIgnoreCase).ToString());

Output:
Strings are similar : True


Refer below for more options:
https://msdn.microsoft.com/en-us/library/system.stringcomparison(v=vs.110).aspx


     

Thursday, 21 July 2016

Interfaces vs Abstracts

Abstract classes and Interfaces plays a major role in making our solution design. I had some time to analyse the best fit for business scenarios and differences.
Interfaces vs Abstracts:
  • Abstract classes specify the commonality in frame and function between multiple classes
  • Interfaces provide a frame for multiple class.
  • Abstract class contains member definition, Interface can only hold declaration.
  • Methods in a interface should be always defined in the derived class, but its not mandatory in abstract class.
  • Abstract classes can be used with classes which share same functionality
  • Interfaces can be used with classes that share different functionalities but similar blueprint.
  • Interfaces are used for dependency inversions and loose coupling
There is an interesting article from Microsoft regarding the same. Please refer https://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx

Saturday, 16 July 2016

Translate Excel sheet content

Globalization, a powerful word that changed the whole way of doing business. Support for multiple languages is must if we develop a product for global audience.
Manual process of converting texts from one language to another is time consuming and error prone process. Recently, we faced a scenario where we had to convert some excel files from Chinese to English. We tried using MS EXCEL and dictionaries available in the same but it resulted in failure. After some research, an add-on available for google spread sheet solved our issue.
Steps to use translate add-on
  • Open google spreadsheet
  • Go to this link and click install/add button available on top right hand side cornerTranslate1
  • Once installed, you will be able to see the translate option at add-on tab available in google spreadsheet. If the same is not available try refreshing the page.
  • After selecting the translate option, you will get options to translate language for a particular excel sheet / for selected range.
The tool worked well for our business scenario.
Note: This tool is suggested based on the business scenario we faced. Please validate the translation before using the output.

HTML Jquery – Text(InnerHTL) vs Value

In JQuery we have two functions called text and val which confuses most of the developers while we try to update an element(Div,Span,input,select)

The following are the breif usage of text and val
text[.text()] – This will return the inner html of an element. Text method is not supported in input elements. Mostly used with Div/Span
value[.val()] – It will return the value of the element. Its mostly used with input and select elements. Val cannot be used with DIV as value is not a supported property of DIV

If interested please go through the following JQuery article’s
http://api.jquery.com/val/
http://api.jquery.com/text/

Contact Form

Name

Email *

Message *