If you try to use HttpUtility.UrlEncode in your plugin or workflow code, you'll get a security error: System.Security.SecurityException: That assembly does not allow partially trusted callers. Because it's not allowed in CRM Online. Instead, we should use this one: Uri.EscapeDataString
Can’t connect to Dynamics 365 Customer Engagement using CRM SDK v9
Exception: Metadata contains a reference that cannot be resolved.