Hey there,
This will require from you to do some coding, but in return you will be able to do some magic with it. 😉
You should start by adding a text field (you can use admin panel for that).
Next, you need to add display callback to that field. With next release you'll be able to do that via admin panel again, but right now you have to do this manually. Execute the following SQL query (putting your field name there):
INSERT INTO task_callback (field, callback, freezed) VALUES ('Your field name here', 'CRM_TasksCommon::display_linked_field', 1)
If you have added any custom module of yours, it'll be even better to change that CRM_TasksCommon::display_linked_field to one of your modules, but otherwise you can add this function in Tasks module code for now.
With that field added and display method redirected to the callback, you now have to add the method display_linked_field (in file modules/CRM/TasksCommon_0.php if you didn't use your own module for that):
public static function display_linked_field($record, $nolink, $desc) {
$v = $record[$desc['id']];
if ($nolink) return $v;
$v = trim($v, ' ');
if ($v=='') return '';
return '<a href="'.$v.'" target="_blank">'.$v.'</a>';
}
You may have to adjust the code to make it simpler for users to set the link: if there's just one string that determines which document they want to link, you can assume that string is the value of the field and alter line
return '<a href="'.$v.'" target="_blank">'.$v.'</a>';
to something like
return '<a href="http://example.com/documents/'.$v.'" target="_blank">'.$v.'</a>';
Hope this helps,
Arek