How to add custom fields in comment section?

Hi,

How can we add custom fields in comment section?

We
want to add “comment type”, “response reason”, “next contact date”
fields in comment section and maintain communication log in comment
section.

I have added custom field in comment form, but custom fields are not showing?

Thanks,
Sambhaji

Comment section is not dynamic.

Hi,
I have added custom script to open prompt box on clicking interaction button.
When we submit, it adds comment on form.

My question is,
From where I can change feed/timeline css? so that I can show custom field in comment?
Currently we need have done report to show comment with custom field value.

It will be great, if we can show comment and custom value in one line.

Thanks,
Sambhaji

How about Not Found :smile:

2 Likes

Hey @rmehta, the link is broken.
Would you be able to provide an updated one?
Thanks!

I think this link should work for you: Not Found

The link is still broken

I Have same Requirement Any Solution ?

Solution ::
frm.add_custom_button(__(‘Enable Batch’), function() {

        let d = new frappe.ui.Dialog({
            fields: [
                {
                    label: 'Add Comment',
                    fieldname: 'add_comment',
                    fieldtype: 'Small Text',
                    reqd: 1
                }

            ],
            primary_action_label: 'Submit',
            primary_action(values) {
                frappe.call({
                    "method": "frappe.desk.form.utils.add_comment",
                    "args": {
                      reference_doctype: frm.doctype,
                      reference_name: frm.docname,
                      content:values.add_comment,
                      comment_email: frappe.session.user,
                      comment_by: frappe.session.user_fullname,
                    }
                });
                d.hide();
    
            } 
    });
    d.show();
2 Likes