Monthly Archives: January 2013

How to retrieve related entity data in Dynamics CRM 2011

This sample shows how to retrieve multiple entities using the RetrieveMultiple method with QueryExpression along with their related entity columns. The code returns columns from the primary account record as well as the firstname and lastname of the primary contacts … Continue reading

Posted in MS CRM 2011 | Tagged , | Leave a comment

How to implement Window Authentication Functionality to a C# Desktop Application

1)  Get currently logged in user details: We can achieve this by using the WindowsIdentity class of System.Security.Principal namespace. This class provides a static method, getCurrent(), which return a object of WindowsIdentity. 2) Validate windows credentials provided by user:(Ask User … Continue reading

Posted in General | Tagged , , | 4 Comments

Writing to an ms access database using C# Window Application

Please try below code to write in MS ACCESS databse using C# Window Application: System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(@”Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\amar\Documents\Database1.accdb”); conn.Open(); using (System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand()) { cmd.Connection = conn; cmd.CommandText = “Insert Into Employee (UserName, fname, sname, email) … Continue reading

Posted in General | Tagged , , | 3 Comments

How to get date value form one form to another form using C# in Window Application

Create a constructor on form2 with input parameter as date time. And when you create object of form2 in form1 just pass the date value using C# in window application. form1 coding: DateTime objdate = dateTimePicker1.Value; form2 objform2= new form2(objdate) … Continue reading

Posted in General | Tagged , | Leave a comment

How to read XML file in Dynamics CRM 2011 using Javascript.

In Dynamics CRM 2011, we could maintain the XML files using web resource utility, which is a very good feature. It could be read using Javascript which is also maintained in the web resources of Dyanmics CRM 2011.You could make … Continue reading

Posted in MS CRM 2011 | Tagged , , | Leave a comment

How to retrieve the Selected Record Ids of a subgrid in Dynamics CRM 2011 using Javascript.

To retrieve the selected records of a subgrid in dynamics crm 2011 just write down below code in your javascript function. var accountContactsGrid= document.getElementById(“accountContactsGrid”).control; var selectedids = gridControl.get_selectedIds();

Posted in MS CRM 2011 | Tagged , , | Leave a comment

How to retrieve current User Id in Dynamics CRM 2011 using Javascript.

Only you need to write below code in your javascript function to get current user Id: var currentUserId = Xrm.Page.context.getUserId();

Posted in MS CRM 2011 | Tagged , | Leave a comment

How to decide IFD deployment of Dynamics CRM 2011 Environment?

When Dynamics CRM 2011 was released, most deployments were strictly on-premise deployments with access restricted to users on the company network or VPN. However, with the changing landscape of how people work, the consumerization of IT, and the upcoming changes … Continue reading

Posted in MS CRM 2011 | Tagged , | Leave a comment

How to create a thread by using C# to show Progress Bar in Window Application

1. Start Microsoft Visual Studio .NET. 2. Create a new Visual C# Windows Application project named ThreadWinApp. 3. Add a Button control to the form. By default, the button is named Button1. 4. Add a ProgressBar component to the form. … Continue reading

Posted in General | Tagged , , , | 1 Comment