Skip to content

Instantly share code, notes, and snippets.

@ethan-sorenson
Last active March 10, 2021 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethan-sorenson/b45ae4b193b3cc631b0d65d232ef3807 to your computer and use it in GitHub Desktop.
Save ethan-sorenson/b45ae4b193b3cc631b0d65d232ef3807 to your computer and use it in GitHub Desktop.
function accountNumber(executionContext){
//retrieve context of current form
var formContext = executionContext.getFormContext();
//get the value of the accountnumber field
var accountNumber = formContext.getAttribute("accountnumber").getValue();
//retrieve the context of the Iframe on the form by it's name
var IFrame = formContext.getControl("IFRAME_Popdock");
//get the currently defined url for the Iframe
var Url = IFrame.getSrc();
//append the parameter(s) to the base url
var param1 = Url+"?customer_number="+ accountNumber;
//assign the updated url to the Iframe
IFrame.setSrc(param1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment