{"id":2583,"date":"2016-04-13T18:22:37","date_gmt":"2016-04-13T12:52:37","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=2583"},"modified":"2021-12-06T15:00:15","modified_gmt":"2021-12-06T09:30:15","slug":"set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/","title":{"rendered":"Set Values of all Data Types using Web API in Dynamics CRM Through C#"},"content":{"rendered":"<p><strong>Introduction:<\/strong><\/p>\n<p>With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms.<\/p>\n<p>In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API.<\/p>\n<p>You may refer this <a href=\"https:\/\/www.inogic.com\/blog\/2016\/03\/programming-using-webapi-through-c-in-dynamics-crm-2016\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog<\/a> for connecting the CRM through the Web API.<\/p>\n<p><strong>Sample code to create an Account Entity Record with all Data Types:<\/strong><\/p>\n<p><strong>\/\/Initialize the WebAPIHandler class on Load of the Form as seen below:<\/strong><\/p>\n<pre class=\"lang:default decode:true \">\/\/Global Variable of Class WebApiHandler\r\nWebApiHandler _webAPIHandler=null;\r\n\/\/Method which Waits for all of the provided Task objects(i.e. Start Method in our case) to complete execution\r\nprivate void CRUD_Load(object sender, EventArgs e)\r\n{         \r\n  Task.WaitAll(Task.Run(async () =&gt; await Start()));\r\n}\r\n\r\nprivate async Task Start()\r\n{\r\n  \/\/Initialize the WebAPIHandler class\r\n webAPIHandler    = new WebApiHandler();\r\n}\r\n\r\n\/\/Button click code which creates the Account record.\r\nprivate void btnCreate_Click(object sender, EventArgs e)\r\n{\r\n            string recordId = string.Empty;\r\n\r\n            \/\/A Json Object used to create account record\r\n            JObject account = null;\r\n\r\n            \/\/Request Uri to store the accounts path \r\n            string requestUri = \"api\/data\/v8.0\/accounts\";\r\n\r\n            try\r\n            {\r\n                \/\/Get the Account Object\r\n                account = CreateAccountRecordObject();\r\n\r\n                \/\/WebAPI Handler method call to Create Record\r\n                recordId = _webAPIHandler.CreateRecord(account, requestUri);         \r\n     }\r\n            catch (Exception err)\r\n            {\r\n\r\n                throw new Exception(err.Message);\r\n            }\r\n\r\n        }\r\n\r\n    \t \/\/\/ &lt;summary&gt;\r\n        \/\/\/ Create Account Record Object\r\n        \/\/\/ &lt;\/summary&gt;\r\n        \/\/\/ &lt;returns&gt;&lt;\/returns&gt;\r\n        private JObject CreateAccountRecordObject()\r\n        {\r\n            JObject account = null;\r\n            try\r\n            {\r\n                account = new JObject();\r\n\r\n                \/\/String Value\r\n                account[\"name\"] = \"Sid Test Co\";\/\/Account Name\r\n\r\n                \/\/Optionset\r\n                account[\"accountcategorycode\"] = \"2\"; \/\/Category : 1--&gt; Preferred Customer, 2--&gt; Standard\r\n\r\n                \/\/Two Options\r\n                account[\"donotsendmm\"] = false; \/\/Marketing Materials : 0--&gt;False\/Send, 1--&gt;True\/Do Not Send\r\n\r\n                \/\/Whole number\r\n                account[\"numberofemployees\"] = 100;\/\/Number of Employees\r\n\r\n                \/\/Custom Decimal Field\r\n                account[\"new_creditrate\"] = 2.25;\/\/Decimal Number (Custom Field) \r\n\r\n                \/\/Lookup\r\n                \/\/Setting the Primary Contact\r\n                account[\"primarycontactid@odata.bind\"] = \"\/contacts(E15C03BA-10EC-E511-80E2-C4346BAD87C8)\"; \/\/Primary Contact\r\n\r\n                \/\/setting the Transaction Currency\r\n                account[\"transactioncurrencyid@odata.bind\"] = \"\/transactioncurrencies(63D588A2-10EC-E511-80E2-C4346BAD87C8)\"; \/\/Currency\r\n\r\n                \/\/Currency\/Money Field\r\n                account[\"creditlimit\"] = 1000; \/\/Currency Limit\r\n\r\n                \/\/Custom Date Only Field\r\n                account[\"new_effectivedate\"] = DateTime.Now; \/\/Date Only (Custom Field)\r\n\r\n\r\n               \r\n            }\r\n            catch (Exception error)\r\n            {\r\n\r\n                throw new Exception(error.Message);\r\n            }\r\n            return account;\r\n        }<\/pre>\n<p><strong>Sample code to create an Activity &amp; set Activity Party:<\/strong><\/p>\n<pre class=\"lang:default decode:true \">\/\/\/ &lt;summary&gt;\r\n        \/\/\/ To Create the Phone Call Record\r\n        \/\/\/ &lt;\/summary&gt;\r\n        \/\/\/ &lt;param name=\"sender\"&gt;&lt;\/param&gt;\r\n        \/\/\/ &lt;param name=\"e\"&gt;&lt;\/param&gt;\r\n        private void btnCreatePhoneCall_Click(object sender, EventArgs e)\r\n        {\r\n            \/\/Request Uri to store the accounts path \r\n            string requestUri = \"api\/data\/v8.0\/phonecalls\";\r\n            string recordId = string.Empty;\r\n            try\r\n            {\r\n                \/\/Create Phone Call Object\r\n                JObject phoneCall = CreatePhoneCall();\r\n                \/\/WebAPI Handler method call to Create Record\r\n                recordId = _webAPIHandler.CreateRecord(phoneCall,requestUri);\r\n            }\r\n            catch (Exception error)\r\n            {\r\n\r\n                throw new Exception(error.Message);\r\n            }\r\n\r\n        }\r\n\r\n\r\n        \/\/\/ &lt;summary&gt;\r\n        \/\/\/ Create PhoneCall Object\r\n        \/\/\/ &lt;\/summary&gt;\r\n        \/\/\/ &lt;returns&gt;&lt;\/returns&gt;\r\n        private JObject CreatePhoneCall()\r\n        {\r\n            \/\/create activity party collection\r\n            JArray parties = new JArray();\r\n\r\n            \/\/create JSON object \r\n            JObject jsonPhoneCall = new JObject();\r\n\r\n\r\n            try\r\n            {\r\n                \/\/set fields using JSON object\r\n                \/\/Single line of text\r\n                jsonPhoneCall[\"subject\"] = \"Test Phone Call\" + DateTime.Now.ToShortDateString(); \/\/Subject\r\n\r\n                \/\/Single line of text &amp; format of phone \r\n                jsonPhoneCall[\"phonenumber\"] = \"4565898756\"; \/\/Phone Number\r\n\r\n                \/\/Multiple Line of Text\r\n                jsonPhoneCall[\"description\"] = \"Phone Call Activity for Testing Purpose only...!\"; \/\/Description\r\n\r\n                \/\/Date and Time\r\n                jsonPhoneCall[\"scheduledend\"] = DateTime.Now; \/\/Due\r\n\r\n                \/\/Lookup\r\n                jsonPhoneCall[\"regardingobjectid_account@odata.bind\"] = \"\/accounts(4B47AA19-88F3-E511-80E6-C4346BACF5C0)\"; \/\/Regarding is an account\r\n\r\n                \/\/ActivityParty (From)\r\n                JObject sender = new JObject();\r\n                sender[\"partyid_systemuser@odata.bind\"] = \"\/systemusers(2e68e212-c82d-4bc6-9493-fbd80204a763)\";\r\n                sender[\"participationtypemask\"] = 1; \/\/From\r\n\r\n                \/\/ActivityParty (To)\r\n                JObject receiver1 = new JObject();\r\n                receiver1[\"partyid_account@odata.bind\"] = \"\/accounts(4B47AA19-88F3-E511-80E6-C4346BACF5C0)\";\r\n                receiver1[\"participationtypemask\"] = 2; \/\/To\r\n                 JObject receiver2 = new JObject();\r\n                receiver2[\"partyid_systemuser@odata.bind\"] = \"\/systemusers(2e68e212-c82d-4bc6-9493-fbd80204a763)\";\r\n                receiver2[\"participationtypemask\"] = 2; \/\/From\r\n\r\n\r\n                \/\/Add this to collection\r\n                parties.Add(sender);\r\n                parties.Add(receiver1);\r\n                parties.Add(receiver2);\r\n\r\n\r\n                \/\/pass parties[] to phonecall_activity_parties\r\n                jsonPhoneCall[\"phonecall_activity_parties\"] = parties;\r\n\r\n                \/\/Whole Number\r\n                jsonPhoneCall[\"actualdurationminutes\"] = 25; \/\/Duration\r\n\r\n                \/\/Two Options\r\n                jsonPhoneCall[\"directioncode\"] = true;\/\/Direction : 0--&gt;False\/Incoming, 1--&gt;True\/Outgoing \r\n            }\r\n            catch (Exception error)\r\n            {                \r\n                throw new Exception(error.Message);\r\n            }\r\n\r\n            return jsonPhoneCall;<\/pre>\n<p>The __webAPIHandler.CreateRecord() method is in WebApiHandler<strong> class.<\/strong><\/p>\n<p><strong>It is as below:<\/strong><\/p>\n<pre class=\"lang:default decode:true \">   \/\/\/ &lt;summary&gt;\r\n   \/\/\/ Method to Return the record ID after creating it in CRM\r\n   \/\/\/ &lt;\/summary&gt;\r\n   \/\/\/ &lt;param name=\"record\"&gt;&lt;\/param&gt;\r\n        \/\/\/ &lt;param name=\"requestUrl\"&gt;&lt;\/param&gt;\r\n        \/\/\/ &lt;returns&gt;&lt;\/returns&gt;\r\n        public string CreateRecord(JObject record, string requestUrl)\r\n        {\r\n            string recordId = string.Empty;\r\n            try\r\n            {\r\n                \/\/Create HttpClient object to send and receive Http Requests and Response\r\n                using (HttpClient httpClient = GetHttpClientObject())\r\n                {\r\n                    \/\/Http Request needed to be sent by the HttpClient\r\n                    HttpRequestMessage requestMessage = GetHttpRequestMessage(HttpMethod.Post, requestUrl, record);\r\n\r\n                    \/\/Send the HttpRequest\r\n                    Task&lt;HttpResponseMessage&gt; response = httpClient.SendAsync(requestMessage);\r\n\r\n                    \/\/Wait till the Response Execution is complete\r\n                    response.Wait();\r\n\r\n                    \/\/If the response is Successfully executed then it will return the value true\r\n                    if (response.Result.IsSuccessStatusCode)\r\n                    {\r\n                        _recordUrl = response.Result.Headers.GetValues(\"OData-EntityId\").FirstOrDefault();\r\n                        splitRetrievedData = _recordUrl.Split('[', '(', ')', ']');\r\n\r\n                        recordId = splitRetrievedData[1];\r\n\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception error)\r\n            {\r\n\r\n                throw new Exception(error.Message);\r\n            }\r\n\r\n            return recordId;\r\n        }\r\n<\/pre>\n<p>For the methods GetHttpClientObject(),GetHttpRequestMessage you may refer this <a href=\"https:\/\/www.inogic.com\/blog\/2016\/03\/programming-using-webapi-through-c-in-dynamics-crm-2016\/\" target=\"_blank\" rel=\"noopener noreferrer\">blog<\/a>.<\/p>\n<p>To get the JObject, JArray i.e Json Objects you need to add reference to the Newtonsoft.Json.You may add it through Nuget using this command <strong>Install-Package Newtonsoft.Json.<\/strong><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p>Hope the above code helps to set all the data types in Dynamics CRM.<\/p>\n<h2 style=\"text-align: left;\"><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:15px;margin-bottom:5px\"><div class=\"su-heading-inner\">One Pic = 1000 words! Analyze data 90% faster with visualization apps!<\/div><\/div><\/h2>\n<p style=\"text-align: left;\"><em>Get optimum visualization of Dynamics 365 CRM data with &#8211;<\/em><br \/>\n<em><strong><a href=\"https:\/\/bit.ly\/3lYvozZ\" target=\"_blank\" rel=\"noopener noreferrer\">Kanban Board<\/a> <\/strong>\u2013 Visualize Dynamics 365 CRM data in Kanban view by categorizing entity records in lanes and rows as per their status, priority, etc.<\/em><br \/>\n<em><strong><a href=\"https:\/\/bit.ly\/3lCSBaA\" target=\"_blank\" rel=\"noopener noreferrer\">Map My Relationships<\/a><\/strong> \u2013 Map My Relationships \u2013 Visualize connections and relationships between Dynamics 365 CRM entities or related records in a Mind Map view.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/\">Read More: Set Values of all Data Types using Web API in\u2026 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,19,65],"tags":[708,709,1821],"class_list":["post-2583","post","type-post","status-publish","format-standard","hentry","category-development","category-dynamics-crm","category-webapi","tag-dynamics-crm-web-api","tag-dynamics-crm-web-api-using-c","tag-web-api-functions-in-dynamics-crm"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Inogic\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2016-04-13T12:52:37+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-12-06T09:30:15+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Inogic\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#blogposting\",\"name\":\"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"Set Values of all Data Types using Web API in Dynamics CRM Through C#\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#articleImage\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"datePublished\":\"2016-04-13T18:22:37+05:30\",\"dateModified\":\"2021-12-06T15:00:15+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#webpage\"},\"articleSection\":\"Development, Dynamics CRM, WEB API, Dynamics CRM Web API, Dynamics CRM Web API Using C#, Web API Functions in Dynamics CRM\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"position\":2,\"name\":\"Development\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#listItem\",\"name\":\"Set Values of all Data Types using Web API in Dynamics CRM Through C#\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#listItem\",\"position\":3,\"name\":\"Set Values of all Data Types using Web API in Dynamics CRM Through C#\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Inogic\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Inogic\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/\",\"name\":\"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2016\\\/04\\\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"datePublished\":\"2016-04-13T18:22:37+05:30\",\"dateModified\":\"2021-12-06T15:00:15+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may","canonical_url":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#blogposting","name":"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"Set Values of all Data Types using Web API in Dynamics CRM Through C#","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/#articleImage","width":1000,"height":325,"caption":"inogic logo"},"datePublished":"2016-04-13T18:22:37+05:30","dateModified":"2021-12-06T15:00:15+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#webpage"},"articleSection":"Development, Dynamics CRM, WEB API, Dynamics CRM Web API, Dynamics CRM Web API Using C#, Web API Functions in Dynamics CRM"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/development\/#listItem","name":"Development"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/development\/#listItem","position":2,"name":"Development","item":"https:\/\/www.inogic.com\/blog\/category\/development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#listItem","name":"Set Values of all Data Types using Web API in Dynamics CRM Through C#"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#listItem","position":3,"name":"Set Values of all Data Types using Web API in Dynamics CRM Through C#","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/development\/#listItem","name":"Development"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Inogic","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Inogic"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/","name":"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"datePublished":"2016-04-13T18:22:37+05:30","dateModified":"2021-12-06T15:00:15+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may","og:url":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/","article:published_time":"2016-04-13T12:52:37+00:00","article:modified_time":"2021-12-06T09:30:15+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"Set Values of all Data Types using Web API in Dynamics CRM Through C# - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"Introduction: With the release of Microsoft Dynamics CRM 2016, Web API which was introduced offers a development experience across many devices, languages and platforms. In this blog we will take a look at how to set the all the datatypes in the CRM using C# through a windows application and using Web API. You may","twitter:creator":"@inogic","twitter:label1":"Written by","twitter:data1":"Inogic","twitter:label2":"Est. reading time","twitter:data2":"5 minutes"},"aioseo_meta_data":{"post_id":"2583","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 06:24:04","updated":"2025-07-04 01:00:03","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/development\/\" title=\"Development\">Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSet Values of all Data Types using Web API in Dynamics CRM Through C#\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Development","link":"https:\/\/www.inogic.com\/blog\/category\/development\/"},{"label":"Set Values of all Data Types using Web API in Dynamics CRM Through C#","link":"https:\/\/www.inogic.com\/blog\/2016\/04\/set-values-of-all-data-types-using-web-api-in-dynamics-crm-through-c\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/2583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=2583"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/2583\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=2583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=2583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=2583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}