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. 😃

Tuesday, November 22, 2016

How To - build, sign and zipalign the already generated Android app apk file with existing key store file?



This process assumes you have html android application which you want to build, sign and zipalign in order to publish it to play store.
Build the apk using cordova command line:
1.       Open command prompt and go to the app folder path.
2.       Run the following command to generate release build
a.       Cordova build android –release
Sign the app with existing keystore
1.       Open command prompt and go to jarsigner path
2.       Jarsigner will be usually found in jdk\bin folder.
3.       Run the following command
a.       <JDK path>\bin>jarsigner -verbose -keystore <keystore file path> <apk path with apk file name> <key store alias>
4.       You will be prompted to enter the password of the key store file. Enter it.
5.       The apk will be signed but no new apk will be generated instead it’ll be overwritten.
Zipalign the apk file
1.       Open the command prompt and go to zip align path which can be found in android-sdks\build-tools\<version>
2.       Run the following command
a.       C:\Users\Yogeshwar.NR\android-sdks\build-tools\23.0.3>zipalign -f -v 4 <signed apk path> <to be generated apk file’s path>
3.       A new apk file will be generated in the specified path.

The output apk file of the last step can be published to play storeJ.

Tuesday, May 10, 2016

Why Professionals should not stop learning?




Every professional is unique in their own way of doing tasks. Each way can be better than another one or it cannot be. But they are unique that's the reason they should not stop learning.
By following or studying a way of doing things professionals can get some idea or can improve the existing system and this is the reason behind the tech we are enjoying now. From Stone age to modern Tech age the way of doing things studied and improved and still advancing by Professionals.
This is the reason why Professional should not stop learning. If they learn that is not only useful for them to improve self also they can be part of future.
one more thing - You become Professional by learning.
I am not afraid of storms for I am learning how to sail my ship. - Louisa May Alcott

Saturday, November 1, 2014

Privacy Policy



We are not using or collection any data from users. This won't requires internet. We won't charge any fee later. Completely free.

This app is only intend to make fun. Do not use it for commercial purposes or for day to day life purposes. User can become fool or make others fool. We are not ensuring this app will entertain you always. It may or may not entertain users. We are responsible for any harm made by app. And we seriously won't entertain such activities.

User can access online version in http://curiousfolk.me

Sunday, August 4, 2013

Saturday, June 29, 2013

Sunday, May 5, 2013

Friday, April 26, 2013

Tuesday, June 10, 2008