0

My requirement is when selection of a web resource one HTML page should appear with the content of that web resource.

So I thought I will add a plugin which will get the content of a web resource and dynamically create a HTML page.

now the problems I am having:

1) when the plugin should fire. because it should fire on selection of any web resource, and didn't show web resource in entity list in VS project using developer's tool kit.

2) How I can get the GUID of that selected web resource to get the content.

please guide me how I can do this. Is there any alternate way to do this?

Thank you.

Tamal Kanti Dey
  • 566
  • 2
  • 8
  • 28
  • 1
    Can you please more explict about what you are trying to achieve. – James Wood Mar 12 '13 at 08:08
  • when click on any web resource in CRM Web Resource page (Settings >Customize the System >web resource) one Html page should appear which will show the content of that web resource. – Tamal Kanti Dey Mar 12 '13 at 08:19
  • It's a bit unclear what you're trying to achieve here. Are you talking about clicking on web resources within a solution? Or clicking on web resources that are on a form? Also, I am fairly sure what you're trying to do is not achievable using a plugin – Conor Gallagher Mar 12 '13 at 12:48

2 Answers2

0

It's a bit unclear what you mean but if I got the nature of your problem correctly, this is the answer to your question.

  1. You're not supposed to use a plugin at all. Since this is an operation on the user interface only, JavaScript is the way to go here. You want to dynamically create contents in a IFRAME component and display those to the user. You should implement onsomeevent method and connect the clicking to fire it.

  2. Accessing web resources is not done by their guids but through their name. At least when trying to access cross frame data stored in such a resource. The name is something that you set yourself when you create or upload the resource to the server.

Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
0

May be i am wrong about this question. Using JavaScript, you can achieve this as well. In JavaScript, access selected WebResource with their name, and you can get details of that WebResourse by making an ActiveXObject.

var JScriptWebResourceUrl = "..Path Of WebResource/jquery.1.4.4.min.js";
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("GET", JScriptWebResourceUrl, false);
xmlHttp.send();
eval(xmlHttp.responseText);

Now, you can do what you want from here.

Thanks,

Anish

Anish
  • 588
  • 6
  • 21