3

I have a Site Map link that opens up a Web Resource .htm page. Everything works great except I want to pass some values to that page. I assumed I could pass them as a querystring since there is the Xrm.Page.context.getQueryStringParameters() method but my querystring seems to get stripped out.

<SubArea Icon="$webresource:my_webresourceicon.gif"Id="nav_my_webresourceid" Url="$webresource:my_webresourcepage.htm?xyz=123" Client="All" AvailableOffline="false" Title="My Web Resource Page" Description="My Web resource Description" Sku="All" PassParams="true"/>

I want to be able to access the parameter xyz from my_webresourcepage.htm as the page loads. What is the best way to go about passing this value?

Thanks

Justin williams
  • 574
  • 1
  • 8
  • 26

1 Answers1

2

Unfortunately you can't pass xyz unless you modify the registry. Instead, you want to use the parameter "data".

http://msdn.microsoft.com/en-us/library/gg309536.aspx

Paul Way
  • 511
  • 2
  • 2
  • So instead of "Url="$webresource:my_webresourcepage.htm?xyz=123"" I should have "Url="$webresource:my_webresourcepage.htm?Data=EncodedParameters"" – Justin williams Mar 20 '12 at 15:32
  • That's right. Although, I always use a lower case "d". It shouldn't be case-sensitive, but I haven't tested it. – Paul Way Mar 20 '12 at 16:51
  • Hi Paul, sorry for coming to this old question. but is it possible to specify the data parameter in the sitemap xml, did that really worked for you? I can set the passparams to 1 and get the orglcid, orgname etc.. but if I add ?data=helloworld i have an empty window.location.search in the webresource.. could somebody confirm that? – Luca Jan 18 '16 at 15:12