title: Dynamics 365 Plugin SDK throwing exception when updating a strongly typed entiy in sandbox mode
body: <p>I'm an learning Dynamics 365 plugin development.</p>
  
  <p><strong>Problem:</strong> When invoking the Update method on a strongly typed entity, I an getting a exception. The exact error message is:</p>
  
  <p>"System.Runtime.Serialization.SerializationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #1330ADC1"</p>
  
  <p><strong>My Setup:</strong>
  My solution contains a simple plugin. I have created a strongly typed entity Account. The plugin's Isolation mode is Sandbox. Telephone1 field is a string.</p>
  
  <p>I retrieve the Account from CRM, then update the Telephone1 field to a new value and update the Account record. Simple :)</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>public class PostOperationaccountUpdate: IPlugin
  {
      public void Execute(IServiceProvider serviceProvider)
      {
          var organisationService = serviceProvider.GetService(typeof (IOrganizationService)) as IOrganizationService;
          var context = serviceProvider.GetService(typeof (IPluginExecutionContext)) as IPluginExecutionContext;
  
          var entityAccount = context.InputParameters["Target"] as Entity;
          var id = entityAccount.Id;
  
          var account = organisationService.Retrieve("account", id, new ColumnSet("telephone1"));
  
          //Get a strongly typed version of the Account entity
          var dbAccount = account.ToEntity&lt;Account&gt;();
  
          //Update the telephone1 field using the "old" way
          account["telephone1"] = "1234567890";
  
          try
          {
              //This will pass
              organisationService.Update(account);
  
              //Update the strongly typed Account
              dbAccount.Telephone1 = "plop";
  
              //This fails
              organisationService.Update(dbAccount);
          }
          catch (Exception ex)
          {
              throw;
          }
      }
  }
  </code></pre>
  
  <p><strong>What have I tried:</strong>
  -> I have changed the plugin's Isolation mode to None - this works! According to the best practices, it isn't recommended</p>
  
  <p>Thanks for the help
  Charles</p>