Advertisements
Home > CRM > Passing data between web resources CRM 2013

Passing data between web resources CRM 2013

Assume you have 2 HTML web resources on your CRM form and you want to pass data from 1 resource to another, below are the steps. In my example I have 2 HTML pages with a Textbox and Button.  

Form with 2 Webresources

Form with 2 Webresources

On Button click, I am reading the value from current HTML page Textbox and setting in to other HTML resource. Below is the script on button click event.

               // Get the other web resource using ‘Parent.Xrm’ var otherResource = parent.Xrm.Page.ui.controls.get(‘{Webresource_SchemaName}‘).getObject().contentWindow; // Get the Text box control from other resource var txtBoxOtherResource = otherResource.document.getElementById(“txtPage2”).value; // Set the value to the Text box control txtBoxOtherResource.value = document.getElementById(‘txtPage1’).value;

Note : To get schema name of a webresource,

  • Open the Customizations form
  • Double click on the web resource and get it as mentioned below
Webresource Schema Name

Webresource Schema Name

🙂

Advertisements
Categories: CRM Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: