Month: February 2018

Difference between Primary and Participating field in business rule

In Microsoft Dynamics CRM buiness rule we use two types of fields the one which we are using in our “if” condition and other one which we are calculating or taking an “Action”.

if you have open the form editor and click on a field property  , by navigating to business rule tab you will see , CRM will tell you the current field is a primary field in which business rule and participating on which business rule:

business rule

 

so the difference is :

  1. Type – Primary : this field is being used in business rule in a “if” conidition and its the base of business rule.
  2. Type – Participating : this field is being calculated based on the other field (Action).

 

hope this helps!

Cheers!

Unified Service Desk 3.2.0 is Released

Unified Service Desk version 3.2.0 has major enhancements on performance diagnostics, faster load times for CRM entity pages and graceful handling and recovery of crashed or unresponsive Internet Processes.

3.2.0.jpg

read the full blog here :  https://blogs.msdn.microsoft.com/usd/2018/02/08/unified-service-desk-3-2-0/

cheers!

How to read a CSV file in a simplest way possible

Hello folks,

I am sure if you have been working with Microsoft Dynamics CRM or any other .net related application – you must have got this situation where you need to read data from a CSV file and do something with it for e.g. either to update this in CRM or write to other file.

here is the code that i used recently – i went through alot blogs and tutorials on how to do this but everything looked confusing to me. So I ended up doing this :

public string ReadCsv()
{
try
{

string csvPath = ConfigurationManager.AppSettings[“FilePath”]; // here i have used configuration manager as i am taking path from config file but you can simple pass the path in string “path” format.

//Read the contents of CSV file.
string csvData = File.ReadAllText(csvPath); // once you do this you will be able to read all the rows of the file. the format of the string would be like /r/n12341/r/n12344/r/rn2244……..

//Execute a loop over the rows.
foreach (string row in csvData.Split(‘\n’)) // removing the /n from the string you will get /r1234 in “row now
{

var id = row.Replace(“\r”, string.Empty); // finally removing “/r from the string.

//your logic goes here , either you can check each id , if this exist in CRM one by one using query by attribute or update this field in CRM etc.

}

 

i hope this helps!