You definitely can!
- Create a text custom field (if you haven't already)
- Edit a page and make sure your new custom field is visible
- Find the
id attribute for the text field for your custom field (i.e., use your browser's developer tools or view the page source).
- Use that id for the
field_id variable in the BugMonkey script below.
- Change the URL that's generated to be correct for Salesforce (I don't use Salesforce, so I don't know what the URL should look like. This example currently links to google.com)
The following BugMonkey customization should do what you're after once you've configured it using the steps outlined above.
name: Sales force link field
description: Takes a text custom field and makes it display as a link to the corresponding case in Salesforce
author: Dane Bertram
version: 1.0.0.0
js:
var field_id= 'ID OF YOUR CUSTOM FIELD GOES HERE';
var linkifyTextField = function() {
var textDiv = $('label[for="idBugViewDialogItem' + field_id + '"]').next();
if (textDiv.length > 0) {
var textVal = textDiv.text();
textDiv
.empty()
.append(
$('<a>')
.attr('href', 'http://www.google.com/?q=' + textVal)
.attr('target', '_blank')
.text(textVal)
);
}
}
$(window).bind("BugViewChange", linkifyTextField);
linkifyTextField();