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); 

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