GetOptionValues of Multiselect Option set Field in C# CRM

Day to Day Dynamics CRM going very interestingly with lot of exciting features. One of the interesting features is Multiselect Optionset Field. In my previous post contains Get / Set Value to MultiSelect Option set Field   and Limitations of Multiselect. Here posting the Get Value of multilselect Optionset Field in C#. Create optionsetCollection. Guid contactid = Guid.Parse("3C79AC20-45BA-E811-A96D-000D3A1CA7D6"); Entity … Continue reading GetOptionValues of Multiselect Option set Field in C# CRM

Read Text File data and Insert in to CRM

Reading the Local text file data and inserting the data into CRM. Here we have created console application by adding all the references. Step 1: Create Console Application  Vs > File > New project > Console Application (ExampleFileReader). Replace program.cs class name with LoadData.cs Add below References to the project. References : Step 2 : … Continue reading Read Text File data and Insert in to CRM

Insert Logs to internal storage

Insert Logs to internal storage : Add a class file.cs extension to the solution. Paste the below code. using System; using System.IO; //Creating Logger Class public class Logger { //Creating method name as "Write" with input parameter public void Write(string Message) { try { DirectoryInfo directoryInfo; string str; string FileWrite; FileWrite = "Y"; str = … Continue reading Insert Logs to internal storage

Paging through Query Expression to retrieve more than 5000 records

Paging through Query Expression to retrieve more than 5000 Records. QueryExpression query = ner QueryExpression("contact");             query.ColumnSet = new ColumnSet(false);             query.PageInfo = new PagingInfo();             query.PageInfo.Count = 5000;             query.PageInfo.PageNumber = 1;     … Continue reading Paging through Query Expression to retrieve more than 5000 records

Writing Logs into a Internal Storage Text File

Writing Logs into a Internal Storage Text File : //Write Log Files to Internal Storage Public void WriteLog(string messages) { String currentdate = DateTime.Now.Date.ToString("dd-MM-YY"); //Internal storage Path string path = string.Format(@"E:\CRMLOGS\{0}_log.txt", currentdate); if (!File.Exists(path)) { File.Create(path); } TextWriter writer = new StreamWriter(path); writer.WriteLine(messages); writer.Close(); } That's It. Enjoy 🙂