function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.