title: Is there a size limit of email message I can put in through "Create draft email" web API (Screen CO409010)?
body: <p>There seems to be size limit of the message I can put in as draft email through WEB API - I was trying to create a draft email message under "Organization" -> "Communications" -> "Email" -> "Draft" through Web API and My code is as follows:</p>
  
  <pre><code>            CO409010Content CO409010 = context.CO409010GetSchema();
              context.CO409010Clear();
  
              List&lt;Command&gt; cmds = new List&lt;Command&gt;();
  
              cmds.Add(new Value { Value = email.FromAddress, LinkedCommand = CO409010.Emails.From });
              cmds.Add(new Value { Value = email.ToAddress, LinkedCommand = CO409010.Emails.To});
              cmds.Add(new Value { Value = email.Subject, LinkedCommand = CO409010.Emails.Subject });
              cmds.Add(new Value { Value = email.Message.Substring(0, 10000), LinkedCommand = CO409010.Emails.NoteText });
  
  
              cmds.Add(CO409010.Actions.Save);
  </code></pre>
  
  <p>The code above worked because I keep the email message within 10000 characters, and it gave me error as below when I didn't limit the size of the message:</p>
  
  <p>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
     at PX.Reports.Parser.ExpressionParser.b(String A_0)
     at PX.Reports.Parser.ExpressionParser..ctor(String text)</p>
  
  <p>By the way, this problem also happens when I tried to add message to opportunity through web API (screen id CR304000), and I don't have any problem with manually entering a long message into a draft email or opportunity.</p>
  
  <p>Is there a size limit of the message that can be put in through WEB API? It seems within 10,000 characters would be OK but not OK if it's more than 10,000.</p>