Changes required is List View

Okay I’ve managed to also achieve the custom button functionality to open up the attachment field for respective document row.

Here’s the code for custom script

button: {
    show(doc) {
        return doc.upload_resume;
    },
    get_label() {
        return 'View Resume';
    },
    get_description(doc) {
        return __('View Resume')
    },
    action(doc) {
        window.open(doc.upload_resume, '_blank').focus();
    }
}

This will save the precious column space on list view and also shield the file path to be directly exposed to the DocType user with limited permissions.

3 Likes