Wednesday, August 16, 2017

Are you the one who knows everything?

Two months ago I thought I know everything about the job I’m doing but actually, I’m not. N-number of persons out there thinking in the same way.

Thinking that we know everything, is that correct or at least is it helpful? If we ask ourselves that “Do I know everything?”. The answer will be definitely NO.
In this situation what exactly we should do? I actually figured it out on my own in the past two months by self-evaluating myself and initially, the result I found was terrifying! Seriously it was a terrible result. But later I realized what I should do.
Here are the findings,
  1. I don't know everything (expected result).
  2. I was unaware of latest techniques. Or I knew it’s existence but I’ve never worked on it.
  3. I was in a comfortable zone.
  4. I know the things what’s needed for my work, nothing more than that.
In order to overcome this psychologically, we need to concentrate on the highlighted areas of my findings. So, here I’m going to explain what I did to surpass this “I know everything” attitude.

Understand where you are

This is the first step you should take to evaluate yourself. Analyze the market. Get to know about trending events and latest technological advancements in your profession.
I believe we should not compare ourselves with others as we all are unique and gifted with talents. But if we are not advancing with current world we could be replaced (Automation stuff? I leave it for your imagination).
Reanalyze the work you do and research the ways that how it can be improved with cutting edge technology also you can consider parameters like cost, the time frame to complete a job and availability of resources.
If you investigate your work with a modern approach you might come to know that “You actually doesn’t know everything!”.

Change your Perception

The second step - Perceiving things with the understanding of you don't know everything will open curiosity or at least you will be able to start consuming new information.
Read the below zen story.
Like this cup, you are full of your own opinions and speculations. How can I show you Zen unless you first empty your cup?
We have understood from the story, we need to change our perception from knowing everything to knowing nothing. This will lead us to learn new things. (Yes, you should learn to improve yourself- Read this article by Karthik.AMR)

Start Reading ( or learning)

By reading one will improve his/her knowledge. Get out of your comfort zone. Read various articles, blogs or even books. Accumulate knowledge.
Get to know the trends in your profession.
Get to know the various ways of accomplishing your job. Have a list of ways to complete it.
Take decisions. As you learned many things now you can take Rational decisions (The Human Power).

Realize Your knowledge is limited

The final stage — Knowing the true self.
Read the golden words of Socrates now,
Socrates — https://quotefancy.com
Now I believe at this stage you might be thinking, “I might have wasted much amount of time just by thinking that I know everything. But in reality, I know something or even nothing. I have to start Learning”.
This is the true self. In this earth everyone knows something and we are surviving with the knowledge we have. Only the people who all are realizing that they have to keep on improving themselves in order to achieve what they have to achieve. And those people are called as winners of life.
If you look back in history, the successful people always know what they have to do, but how did they know? They knew that “they don’t know everything” and they never stopped improving themselves.
Now it is your turn to improve yourself. Go ahead.
Hope I conveyed you a useful message. Please log your responses below.

Wednesday, February 8, 2017

MS Dynamics CRM and Dynamics 365: Find Entity Logical name by only using Record primary key(GUID)

As a integration developer I've been always forced to find solutions for complex problems, eventually every time I gain knowledge and found solutions in the end (sometimes multiple for a single problem).

A week back I had faced an issue in my work environment when I was integrating an application with Dynamics CRM. The issue here is, I have a primary key value of a particular entity record and I need to find the entity logical name.

So, obviously when we first hear this problem, most of us would have found the solution like below,
  1. Fetch all entities metadata.
  2. Iterate through them and execute a retrieve request on each entity for the given value(primary key as GUID).
  3. The execution which doesn't gives the exception is the answer. 
The above is the one and only way here, but what about the performance? If the UI has to refresh based on this how much time the user has to wait? Is it actually solves the problem. It does solve the problem but there arises new problems. So it'll be better to optimize the solution which I'm going to explain in here.

We will be making couple of calls to CRM instead of bunch of calls to get the desired answer i.e., the logical name of the entity which belongs to the given value.

  1. First call to CRM, get all entities metadata by specifying the EntityFilters as Entity.
  2. Create a list of Retrieve requests with retrieved entities and given value (GUID).
  3. Second CRM call, in Dynamics CRM we've a special request called ExecuteMultiple which is capable of executing maximum of 5000 calls by default. Create a ExecuteMultiple Request instance and add the created retrieve requests to the RequestCollection of the EntityMultiple request. And execute it in CRM.
  4. The response will not give you an exception but will give you a response with collection of responses. In which except one response all other will have IsFaulted=true.
  5. Third Part is finding the succeeded response. You can use LINQ to find which is easy to write for developers.
Now you've got the pseuodocode of a better approach (I'll not it as a best approach, 'coz there are people living stronger than the strongest person). I'll soon post the example code in my github page.

Thank you and all the best. 😃