one of the possible solution for this to ensure the fieldname is existing in that particular entity
This blog aims to provide some technical tips about Microsoft Dynamics CRM 4.0 to D365, SQL Server and .Net.
Tuesday, October 6, 2015
Can't access Microsoft.Xrm namespace in Visual Studio
The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Solution:
Double check in your project settings to see which Target Framework you are using. If it is .NET Framework 4 Client Profile try changing it to .NET Framework 4.
Solution:
Double check in your project settings to see which Target Framework you are using. If it is .NET Framework 4 Client Profile try changing it to .NET Framework 4.
provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified
If your facing the below issue in .NET
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Check the connection string in your Config file
<connectionStrings>
<add name="Connection" providerName="System.Data.SqlClient"
connectionString="Trusted_Connection=Yes;persist security info=False;Integrated Security=SSPI; Data Source=ServerName\SQLExpress;Initial Catalog=databasename" />
</connectionStrings>
confirm that we have only one "\" in DataSource
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Check the connection string in your Config file
<connectionStrings>
<add name="Connection" providerName="System.Data.SqlClient"
connectionString="Trusted_Connection=Yes;persist security info=False;Integrated Security=SSPI; Data Source=ServerName\SQLExpress;Initial Catalog=databasename" />
</connectionStrings>
confirm that we have only one "\" in DataSource
Wednesday, September 23, 2015
How to set the OptionSet value in Plugin
Entity opp = new
Entity("opportunity");
opp ["name"] = "Test Opportunity"; // string
opp ["estimatedclosedate"] = new DateTime(2015, 12, 1); // DateTime
opp ["discountpercentage"] = 0.5; // decimal
opp ["closeprobability"] = 82; // int
opp ["isrevenuesystemcalculated"] = false; // bool
Here is how we would set special field values in Dynamics CRM 2011.
These include OptionSetValue, Money (Currency), and EntityReference (Lookup).
Entity opp = new Entity("opportunity");
opp["opportunityratingcode"] = new OptionSetValue(2); // OptionSetValue
opp["estimatedvalue"] = new Money(700.2M); // Money
opp["campaignid"] = new EntityReference("campaign", campaignId);
opp ["name"] = "Test Opportunity"; // string
opp ["estimatedclosedate"] = new DateTime(2015, 12, 1); // DateTime
opp ["discountpercentage"] = 0.5; // decimal
opp ["closeprobability"] = 82; // int
opp ["isrevenuesystemcalculated"] = false; // bool
Here is how we would set special field values in Dynamics CRM 2011.
These include OptionSetValue, Money (Currency), and EntityReference (Lookup).
Entity opp = new Entity("opportunity");
opp["opportunityratingcode"] = new OptionSetValue(2); // OptionSetValue
opp["estimatedvalue"] = new Money(700.2M); // Money
opp["campaignid"] = new EntityReference("campaign", campaignId);
Microsoft Visual Studio is waiting for an operation to complete
Microsoft visual studio is busy waiting for an operation to complete
If you
encounter Microsoft Visual Studio is waiting for an internal operation to
complete then you should try killing rdpclip.exe
Thursday, June 25, 2015
CRM CONSULTANT VS CRM DEVELOPER
One of the thing which needs to be clear to clients, companies when we work on projects is the role of a consultant and role of the developer in the projects. This becomes more important when we have larger implementations and multi-geography teams and deployments to handle.
CRM consultant’s is an expert who will visit clients (or be a semi-permanent contractor in an organisation) and advise them on their CRM systems, train employees in
the use of the CRM systems, configure/set up/customise their CRM systems and possibly design/develop software for that organisation (or at least provide a design
spec/requirements for the software and manage the project with software developers).
CRM Developer’s will work on a broad spectrum of work, however, it’s likely to be designing/developing software for a specific purpose or design brief with little or no involvement with the end client.
Or it could be in-house software development for the IT systems of the company that you are working for.
CRM consultant’s is primarily a customer facing function and lot of it involved not only techno-functional skills but also communication skills, presentation skills alongside.
A Technical consultant will also need to possess great CRM and .net technical experience set as well.
CRM developer’s on the other hand is very hands-on job, primarily focused on technical delivery and to develop and package new services and/or offerings in line your organisation and client expectations.
CRM Consultant’s job is also to contribute to the participation in scoping, estimating and risk management efforts.
Also, to participate in building knowledge capital, improving the aptitude of your team by sharing your technical knowledge and experience.
CRM developer’s primary focus is to deliver code maintaining code quality, unit testing and fix bugs with least number of bugs introduced to the project.
CRM Consultant job is to suggest the best possible solution to problem and making it an easy job for the customer to select the best option.
It might be his/her job to complete technical delivery as well.
CRM developer’s need to have not only sound background of CRM but also of Unit testing frameworks.
Referred from Deepesh Somani blog.
Referred from Deepesh Somani blog.
Friday, June 19, 2015
Common reasons for slow form loading in MS CRM
The main reason of slow loading forms are
• Busy Javascript onload functions
• Too many subgrids
• Lots of oData/fetchXML queries
• Tabs, sections and fields not needed on the form
• bad/slow coding
We had our list of worst performing forms and we had a quick look at them and made some quick notes
• How many unfiltered OData retrieves
• How many OData calls, where they retrieving the same set
• Number of ribbon buttons
• potential fields/functionality which could be removed by change of business process
• size of Javascript onload function
Finding the Slow Forms
Fiddler
One of the tools I used to analyize the slow loading CRM forms was fiddler. I wrote a blog post about Getting Started with Fiddler and CRM. It’s a great tool to see what calls are being made from the page, how long they took and how much data they were bringing back.
Looking at the fiddler logs I was able to investigate the OData queries and find
• Which OData calls took the longest
• Find OData calls which were not filtered
• Find OData calls which were retrieving the same data multiple times
• general loading times of sections of code
F12 Debugger
The F12 debugger is such an awesome tool for debugging Javascript. I put in a break point in the onload Javascript and walked through the code.
We are using two main methods to find slow loading code
Looking at the code
Stepping through the code
How to speed up form loading
In some of the forms we were retrieving fields from related entities but to speed up the form the customer was happy to use lookups and click those for more information if it was needed. This saved OData queries
These changes can remove some of the code triggered on the Javascript onload.
Improvements can come from moving fields and subgrids into unexpanded tabs where the loading can be delayed until the tab is expanded
Remove unwanted/unused fields
CRM Developers have to refactor their code then I think CRM Forms and entities should be refactored to remove the noise of unused fields.
There is a great tool to help you with this called CRM Data Detective it will show you what fields are being used/not used by seeing if any values were written to those fields. The CRM Data Detective is a free tool which works with CRM 2011 and CRM 2013.
• Busy Javascript onload functions
• Too many subgrids
• Lots of oData/fetchXML queries
• Tabs, sections and fields not needed on the form
• bad/slow coding
We had our list of worst performing forms and we had a quick look at them and made some quick notes
• How many unfiltered OData retrieves
• How many OData calls, where they retrieving the same set
• Number of ribbon buttons
• potential fields/functionality which could be removed by change of business process
• size of Javascript onload function
Finding the Slow Forms
Fiddler
One of the tools I used to analyize the slow loading CRM forms was fiddler. I wrote a blog post about Getting Started with Fiddler and CRM. It’s a great tool to see what calls are being made from the page, how long they took and how much data they were bringing back.
Looking at the fiddler logs I was able to investigate the OData queries and find
• Which OData calls took the longest
• Find OData calls which were not filtered
• Find OData calls which were retrieving the same data multiple times
• general loading times of sections of code
F12 Debugger
The F12 debugger is such an awesome tool for debugging Javascript. I put in a break point in the onload Javascript and walked through the code.
We are using two main methods to find slow loading code
Looking at the code
Stepping through the code
How to speed up form loading
In some of the forms we were retrieving fields from related entities but to speed up the form the customer was happy to use lookups and click those for more information if it was needed. This saved OData queries
These changes can remove some of the code triggered on the Javascript onload.
Improvements can come from moving fields and subgrids into unexpanded tabs where the loading can be delayed until the tab is expanded
Remove unwanted/unused fields
CRM Developers have to refactor their code then I think CRM Forms and entities should be refactored to remove the noise of unused fields.
There is a great tool to help you with this called CRM Data Detective it will show you what fields are being used/not used by seeing if any values were written to those fields. The CRM Data Detective is a free tool which works with CRM 2011 and CRM 2013.
Subscribe to:
Posts (Atom)