Posts

Showing posts with the label Programming Learning

Dynamics CRM 365 Error 'The Given Key is not present in dictionary'

As a Dynamics CRM developer we always come across the error saying that 'The Given Key is not present in dictionary'. The reason we receive this error message because of below issues:- When we try to get the attribute value from Entity object without checking the attribute. String AccountNumber=objAccount["accountnumber"];   The above line will throw error if ObjAccount doesn't contains this attributes.  TO fix this we should always check attributes in Entity object then get the value. Resolution: if(objAccount.attributes.contains("accountnumber")) String AccountNumber=objAccount["accountnumber"];            We can also use below code which will return null if attribute is not present in Entity object. string AccountNumber=objAccount.GetAtrributeValue<String>("accountnumber"); Happy CRMing!

Data Structure Interview Question And Answer

           Data Structure 19. In RDBMS, what is the efficient data structure used in the internal storage representation? B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes. 20. What is a spanning Tree? A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized. 21. Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? No. The Minimal spanning tree assures that the total weight of the tree is kept at its minimum. But it doesn't mean that the distance between any two nodes involved in the minimum-spanning tree is minimum. 22. Which is the simplest file structure? (Sequential, Indexed, Random) Sequential is the simplest file structure. 23. Whether

C Programming interview question and Answer

        C programming 1. What is a local block? A local block is any portion of a C program that is enclosed by the left brace ( { ) and the right brace ( } ). A C function contains left and right braces, and therefore anything between the two braces is contained in a local block. An if statement or a switch statement can also contain braces, so the portion of code between these two braces would be considered a local block. Additionally, you might want to create your own local block without the aid of a C function or keyword construct. This is perfectly legal. Variables can be declared within local blocks, but they must be declared only at the beginning of a local block. Variables declared in this manner are visible only within the local block. Duplicate variable names declared within a local block take precedence over variables with the same name declared outside the local block. Here is an example of a program that uses local blocks: #include <stdio.h> void main