Showing posts from August, 2014

Secure Connection String when using data source control i.e Encrypt/ Decrypt the connection string in Web.config file.

In this blog, i am going to explain how to encrypt/ decrypt the Connection Strings in web.config file in Asp.Net Encrypt connectionString Step 1:: Goto Visual Studio Developer Command Prompt  Goto --> C:\Windows\System32\cmd.exe  Then type--> cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 Step 2:: Now type following command ::                      aspnet_regiis -pef connectionStrings "e:\aayush singh\CRM2013reportsext\CRMwebPortal" -prov DataProtectionConfigurationProvider Here –pef indicates that the application is built as File System website. Second argument connectionStrings indicates that name of the configuration section needs to be encrypted. The Third argument is the physical path of the folder where the web.config file is located. Step 3:: After enter the command click enter if everything goes well you get a success message like “Encrypting configuration section… Succeeded!” [See below the screenshot] Step 4:: Now, goto your solution che

Connect to Microsoft Dynamics CRM 2013 online using C#

In this blog, I am going to explain how to create connection with Online Microsoft Dynamics CRM and how to fetch data of CRM using C#. Fetch records from online crm entity using c#. First of all add required references and add few important namespaces : using Microsoft.Xrm.Sdk; using Microsoft.Crm.Sdk; using Microsoft.Crm.Sdk.Messages; using Microsoft.Xrm.Sdk.Query; using Microsoft.Xrm.Sdk.Client; using Microsoft.Xrm.Client.Services; using Microsoft.Xrm.Client; using Microsoft.Xrm.Sdk.Messages; Now, for creating connection with Online dynamics CRM 2013, add below code inside your class with your URL, UserName and Password of your Online Dynamics CRM . OrganizationService _orgservice = new OrganizationService(CrmConnection.Parse("Url=;; Password=YourPassword;")); Now, for retrieving records from your online CRM for any entity get the fetchXML by using AdvancedFind and use that

SSRS total pages number error. (Adds a Question mark(?) after total page number in SSRS report)

Paging Issue in SSRS Report adds a question mark instead of display the total number of pages In this blog i am going to give the solution how to solve this problem. Generally the problem could be like below: Suppose we have one report deployed on ssrs 2008, it shows on view report 1 of 2? or 2 of 3? and so on... as shown below in image. So if you can see the screenshot there is a question mark after 3(Encircled in red) .we have a total of 50 pages in the report but instead of displaying the last page it is showing a question mark and we cannot show question mark as it was client request. When press to show next page, it shows 2 of 3?, after 3 of 4?. And in that mode till the end of the report. So, we could easily solve this error. Just place a textbox in footer or header and goto the Expression of that textbox. Now goto Built-In Fileds and select OverallTotalPages(or type in query box:: =Globals!OverallTotalPages) i.e. Place Textbox in Header/ Footer-> Goto Exp

StateCode and StatusCode Values for mostly used entities in Microsoft Dynamics CRM 2013

In this blog I have given a list of all StateCode and StatusCode of useful entities. Please refer MSDN for more details for any doubt if you have regarding any thing. I also have collected this through MSDN The following table shows default Microsoft CRM values for StateCode and StatusCode. Each StateCode has its own default StatusCode value. For example, if a Product StateCode is 0 (Active), the default StatusCode is 1 (Active(default)). If the Product StateCode is 1 (InActive), the default StatusCode is 2 (Inactive(default)). Microsoft CRM only accepts StatusCodes that are valid for a particular StateCode. Entity Status (statecode) Status Reason (statuscode) Account (account) 0 Active 1 Active 1 Inactive 2 Inactive Activity (activitypointer) 0 Open 1 Open 1 Completed 2 Completed 2 Canceled 3 Canceled 3 Scheduled
go to top image