{"id":20365,"date":"2019-08-30T09:40:42","date_gmt":"2019-08-30T09:40:42","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=20365"},"modified":"2022-06-24T12:58:46","modified_gmt":"2022-06-24T07:28:46","slug":"set-regarding-and-party-list-field-in-dynamics-365-crm-uci-using-open-entity-form","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2019\/08\/set-regarding-and-party-list-field-in-dynamics-365-crm-uci-using-open-entity-form\/","title":{"rendered":"Set Regarding and Party list field in Dynamics 365 CRM UCI using Open Entity Form"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>With the release of Dynamics 365 V9.0 many client API has been changed. The list of the client API in which Dynamics 365 v9.0 is supported is available <a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/get-started\/whats-new\/customer-engagement\/important-changes-coming#some-client-apis-are-deprecated\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<p>In this blog, we will see how to set regarding and party list field using open entity form in UCI.<\/p>\n<p>We had a requirement to open the new entity form and populate the regarding and party list field of\u00a0 activity entity. We tried the standard way to open the entity form with required fields need set using client API as given below:<\/p>\n<p>var parameters = {};<\/p>\n<p>var entityFormOption = {};<\/p>\n<p>\/\/Set the reqarding field value<br \/>\nparameters[&#8220;pId&#8221;] = &#8220;2878282E-94D6-E111-9B1D-00155D9D700B&#8221;;<br \/>\nparameters[&#8220;pName&#8221;] =\u00a0&#8220;Contoso&#8221;;<br \/>\nparameters[&#8220;pType&#8221;] = 1;\u00a0 \u00a0\/\/object type code<\/p>\n<p>\/\/set required attendees<\/p>\n<p>parameters[&#8220;partyid&#8221;] =\u00a0&#8220;2878282E-94D6-E111-9B1D-00155D9D700B&#8221;;<\/p>\n<p>parameters[&#8220;partyname&#8221;] =\u00a0&#8220;Contoso&#8221;;<\/p>\n<p>parameters[&#8220;partytype&#8221;] = 1;\u00a0\/\/object type code<\/p>\n<p>\/\/open new record<\/p>\n<p>entityFormOption.entityName = &#8220;appointment&#8221;;<br \/>\nentityFormOption.entityId = null;<br \/>\nentityFormOption.openInNewWindow = true;<\/p>\n<p>\/\/open the entity record<br \/>\nXrm.Navigation.openForm(entityFormOption, parameters,\u00a0successCallback, errorCallback);<\/p>\n<p>However, the above code did not populate the regarding and party list field of activity entity.<\/p>\n<p>We tried to find another way to set these fields. However, the fields were not populated while opening the entity form using <strong>Xrm.Utility.<\/strong><strong>openForm<\/strong> in UCI.<\/p>\n<p>Finally, we found a way to populate the values for these fields while opening the entity form in UCI. Given below is the code which can be used for the same:<\/p>\n<p>var parameters = {};<\/p>\n<p>\/\/Set regarding field<\/p>\n<p>parameters[&#8220;regardingobjectid&#8221;] = &#8220;2312bf7b-c57b-e911-a99a-00224800c5e8&#8221;;<\/p>\n<p>parameters[&#8220;regardingobjectidname&#8221;] = &#8221; Contoso&#8221;;<\/p>\n<p>parameters[&#8220;regardingobjectidtype&#8221;] = \u201caccount\u201d; \u00a0 \/\/logical name<\/p>\n<p>\/\/set partylist field<\/p>\n<p>var value = new Array();<br \/>\nvalue[0] = new Object();<br \/>\nvalue[0].id = &#8220;34cf15jk-445a-e843-80bb-a5334caf8811&#8221;;<br \/>\nvalue[0].name = &#8220;richard smith&#8221;;<br \/>\nvalue[0].entityType = &#8220;contact&#8221;;<\/p>\n<p>parameters[&#8220;requiredattendees&#8221;] = value; \/\/&#8221;Required&#8221; field<\/p>\n<p>\/\/open new appointment record<\/p>\n<p>entityFormOption.entityName =\u201dappointment\u201d;<\/p>\n<p>entityFormOption.entityId = null;<\/p>\n<p>entityFormOption.openInNewWindow = true;<\/p>\n<p>entityFormOption.cmdbar = true;<\/p>\n<p>\/\/open the entity record<\/p>\n<p>Xrm.Navigation.openForm(entityFormOption, parameters,\u00a0successCallback, errorCallback);<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>By using the above code, we can set the regarding and party list field while opening any entity form using client API in Dynamics 365 UCI.<\/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\">Free 70% of storage space in CRM with Attachment Management Apps!<\/div><\/div><\/h2>\n<p><em><strong><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/attach-2-dynamics-365-crm-upload-multiple-files-sharepoint-cloud-storage\" target=\"_blank\" rel=\"noopener noreferrer\">Attach2Dynamics<\/a> &#8211; Store and manage documents\/attachments in cloud storage of your choice &#8211; SharePoint, Dropbox or Azure Blob Storage from within Dynamics 365 CRM.<\/strong><\/em><br \/>\n<em><strong><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/dynamics-365-crm-sharepoint-security-metadata-sync\" target=\"_blank\" rel=\"noopener noreferrer\">SharePoint Security Sync<\/a><\/strong> \u2013 Robust and secure solution to integrate Dynamics 365 CRM and SharePoint Security Sync thereby ensuring secure access to confidential documents stored in SharePoint.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction With the release of Dynamics 365 V9.0 many client API has been changed. The list of the client API in which Dynamics 365 v9.0 is supported is available here. In this blog, we will see how to set regarding and party list field using open entity form in UCI. We had a requirement to\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2019\/08\/set-regarding-and-party-list-field-in-dynamics-365-crm-uci-using-open-entity-form\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":20366,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,18,59,60],"tags":[1930],"class_list":["post-20365","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365","category-dynamics-365-v9-2","category-uci","category-unified-interfaceuci","tag-dynamics-365-crm-uci"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/20365","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=20365"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/20365\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/20366"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=20365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=20365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=20365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}