+ Start a Discussion
RRESRRES 

Creating a Hyperlink field that includes some javascript

Hey Everyone,

I am trying to create a hyperlink field on a custom object record that can be engaged from an Enhanced view. The purpose of the link is to create a new billing record that is related to a job, then close the window upon saving. Here is my URL:

HYPERLINK("/a09/e?CF00N40000001pOua=" & Name & "CF00N40000001pOua_lkid=" & Id & "saveURL=javascript:self.close()", "Create Bill")

Upon clicking the link I get the following message:

Cross-site Scripting
Possible cross site scripting attempt detected.

Is there anyway I can modify the link above so I can close the window upon save? Also how would I format the URL to open a new window? I tried appending _blank to the end of the URL and it doesn't validate.