Recently I have been tasked with a POC where I need to embed an external java script in to Dynamics Portals. The task looks simple as one line, i.e. to allow users to manipulate image on dynamics Portals before saving it into CRM/another storage.
Being new to Portals work, its challenging for me to achieve this task.
Then I created a new HTML webresoruce and embedded it into one of the CRM forms and used an entity list in Portal to showcase this form. This was simple and got immediate results. I was able to see my web resource on Dynamics portals. I thought I could achieve the functionality using this approach. However, this ended in vain as Portal did not refresh html webresoruce after the first publish. Clear Cache, did not help too.
For this example I am taking an existing image from portal web files rather than allowing users to upload an image. So created 2 web files to support this exercise.
Uploaded an image file. Portal considers partial URL field to embed your resources in to page. Uploaded image file in to notes section.
When clicked on Crop button