How to get viewer uri from workflow?
I have two images in the viewer location, e.g. d:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\wpdcortex\REST Elements\Sites\Flood_Pro\Viewers\Flood_Pro\VirtualDirectory\Resources\Images\Custom\image.png. My viewer url is: http://mysite/myinstance/?viewer=floodpro
I need to get the uri for the image so i can use it for the image control on a form. Right now i have the uri hard-coded in (http://mysite/Geocortex/Essentials/myinstance/REST/sites/Flood_Pro/viewers/Flood_Pro/VirtualDirectory/Resources/Images/Custom//hms1616.png). However i need to get it dynamically so i do not need to change it when the veiwer is prompted from dev to test to production.
GetBrowserUrl activity only gave url version displayed on the website. It does help me to locate the image.
Please help. Thanks.
0
-
Hi Yinghong,
You can use the Get Request Info to grab the first part of the URL. In your workflow, it should look something like this:
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000XbhJ&feoid=Body&refid=0EM60000000XuYo" _/_img_
There is a method you can use from the requestInfo variable called Application Path that will grab the first part of the URL up until the Virtual Directory folder. So if you are using this method, your hyperlink URI should look something like this:
requestInfo.ApplicationPath + "/Resources/Images/Custom//hms1616.png"
You will have to set the latter half of the URL but at least the first half can be generated dynamically to avoid issues when migrating between instances/servers.
I hope this helps.
Regards,
Carmen0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar