Dynamic URL for Web-Page Object

I would like to embed an external web page from the Account record and pass the Account's identifier number into the URL as a parameter.

 

For example, if I am on an Account record with ID 1234, I would like to pass this ID into the base URL so that the following URL is loaded.

 

http://www.mywebsite.com/mywebpage?ID=1234

Is this possible?  If so, how is this accomplished?

Like 0

Like

3 comments

I'm not sure I understand what you need. To get an Id of current record, use var id = this.get("Id"). To open new url, use window.open("http://www.mywebsite.com/mywebpage?ID="+id, "_blank")

Hi Peter

Thanks for replying.  I am asking about embedding an external web page within a tab on the Account record.  Using the Web-Page dashboard functionality, it exposes a text URL property, but it doesn't seem to have any settings to make the URL dynamic based on parameter values (i.e. the ID of the Account in context).

-James

Dear James.

For embedded web page we use iframe technology. So it's not a bpmonline element and the only option to change url in iframe is using simple javascript. For example, you may add action that will change url in your widget:

    someFunction: function() {

               var myFrame = document.getElementById("t-comp193-webpage-widget"); // id of your iframe element you can find out from inspecting html

                if (myFrame) {

                    myFrame.src = "https://www.microsoft.com/net/"; // changing a link attribute

                }

            }

Show all comments