{"id":18,"date":"2020-07-28T19:18:54","date_gmt":"2020-07-28T11:18:54","guid":{"rendered":"https:\/\/just-a-web.com\/blog\/?p=18"},"modified":"2020-11-01T21:12:24","modified_gmt":"2020-11-01T13:12:24","slug":"web-resource-html-implementation","status":"publish","type":"post","link":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/","title":{"rendered":"Web Resource HTML Implementation In UCI"},"content":{"rendered":"\n<p>Recently I have found out below new client API:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><em>getContentWindow&nbsp;\u2013 Returns the content window that represents an IFRAME or web resource.<\/em><\/p><\/blockquote>\n\n\n\n<p>It is use to get the control of web source and calling the internal method by passing the Xrm and FormContext during Form On Load.<\/p>\n\n\n\n<p>Source:&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/model-driven-apps\/clientapi\/reference\/controls\/getcontentwindow\">https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/model-driven-apps\/clientapi\/reference\/controls\/getcontentwindow<\/a><\/p>\n\n\n\n<p>But there is a cons where user might refresh the web resource using right click and it won\u2019t trigger the method.<\/p>\n\n\n\n<p>Two ways to solve this issue at current moment:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Pass required data through parameters \u2013<\/li><\/ol>\n\n\n\n<p>Source:&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customerengagement\/on-premises\/developer\/sample-pass-multiple-values-web-resource-through-data-parameter\">https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customerengagement\/on-premises\/developer\/sample-pass-multiple-values-web-resource-through-data-parameter<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Using parent.Xrm \u2013<\/li><\/ol>\n\n\n\n<p>Source:&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/model-driven-apps\/clientapi\/reference\/getglobalcontext-clientglobalcontext.js.aspx\">https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/model-driven-apps\/clientapi\/reference\/getglobalcontext-clientglobalcontext.js.aspx<\/a><\/p>\n\n\n\n<p>Personally I prefer method 1 in my opinion as parent.Xrm will be obsolete (I guess) in future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I have found out below new client API: getContentWindow&nbsp;\u2013 Returns the content window that represents an IFRAME or web resource. It is use to get the control of web source and calling the internal method by passing the Xrm and FormContext during Form On Load. Source:&nbsp;https:\/\/docs.microsoft.com\/en-us\/powerapps\/developer\/model-driven-apps\/clientapi\/reference\/controls\/getcontentwindow But there is a cons where user might&hellip;&nbsp;<a href=\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Web Resource HTML Implementation In UCI<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1,2,3],"tags":[6,4,5],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-dynamics","category-javascript","category-webresource","tag-data-parameter","tag-getcontentwindow","tag-parent-xrm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Web Resource HTML Implementation In UCI - Dynamics Blog<\/title>\n<meta name=\"description\" content=\"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Web Resource HTML Implementation In UCI - Dynamics Blog\" \/>\n<meta property=\"og:description\" content=\"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM\" \/>\n<meta property=\"og:url\" content=\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\" \/>\n<meta property=\"og:site_name\" content=\"Dynamics Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-28T11:18:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-01T13:12:24+00:00\" \/>\n<meta name=\"author\" content=\"hk.ang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hk.ang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\"},\"author\":{\"name\":\"hk.ang\",\"@id\":\"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af\"},\"headline\":\"Web Resource HTML Implementation In UCI\",\"datePublished\":\"2020-07-28T11:18:54+00:00\",\"dateModified\":\"2020-11-01T13:12:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\"},\"wordCount\":150,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af\"},\"keywords\":[\"data-parameter\",\"getContentWindow\",\"parent.Xrm\"],\"articleSection\":[\"Dynamics\",\"Javascript\",\"Web Resource\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\",\"url\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\",\"name\":\"Web Resource HTML Implementation In UCI - Dynamics Blog\",\"isPartOf\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/#website\"},\"datePublished\":\"2020-07-28T11:18:54+00:00\",\"dateModified\":\"2020-11-01T13:12:24+00:00\",\"description\":\"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM\",\"breadcrumb\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/just-a-web.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Resource HTML Implementation In UCI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/just-a-web.com\/blog\/#website\",\"url\":\"https:\/\/just-a-web.com\/blog\/\",\"name\":\"Dynamics Blog\",\"description\":\"A blog that related to coding stuff\",\"publisher\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/just-a-web.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af\",\"name\":\"hk.ang\",\"logo\":{\"@id\":\"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/just-a-web.com\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Web Resource HTML Implementation In UCI - Dynamics Blog","description":"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/","og_locale":"en_US","og_type":"article","og_title":"Web Resource HTML Implementation In UCI - Dynamics Blog","og_description":"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM","og_url":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/","og_site_name":"Dynamics Blog","article_published_time":"2020-07-28T11:18:54+00:00","article_modified_time":"2020-11-01T13:12:24+00:00","author":"hk.ang","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hk.ang","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#article","isPartOf":{"@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/"},"author":{"name":"hk.ang","@id":"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af"},"headline":"Web Resource HTML Implementation In UCI","datePublished":"2020-07-28T11:18:54+00:00","dateModified":"2020-11-01T13:12:24+00:00","mainEntityOfPage":{"@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/"},"wordCount":150,"commentCount":0,"publisher":{"@id":"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af"},"keywords":["data-parameter","getContentWindow","parent.Xrm"],"articleSection":["Dynamics","Javascript","Web Resource"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/","url":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/","name":"Web Resource HTML Implementation In UCI - Dynamics Blog","isPartOf":{"@id":"https:\/\/just-a-web.com\/blog\/#website"},"datePublished":"2020-07-28T11:18:54+00:00","dateModified":"2020-11-01T13:12:24+00:00","description":"HTML Web Resource in UCI - using getContentWindow to work with data parameters and parent.XRM","breadcrumb":{"@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/just-a-web.com\/blog\/2020\/07\/28\/web-resource-html-implementation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/just-a-web.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Web Resource HTML Implementation In UCI"}]},{"@type":"WebSite","@id":"https:\/\/just-a-web.com\/blog\/#website","url":"https:\/\/just-a-web.com\/blog\/","name":"Dynamics Blog","description":"A blog that related to coding stuff","publisher":{"@id":"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/just-a-web.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/7c5fde715b55adf97070f3506709b0af","name":"hk.ang","logo":{"@id":"https:\/\/just-a-web.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/just-a-web.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":3,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":22,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions\/22"}],"wp:attachment":[{"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/just-a-web.com\/blog\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}