Hi guys,
I am trying to share a doctype via custom script?
@vivek, you can use the cur_frm.share_doc() method or you can directly share document with user using frappe.share.add method, please check the share.js
cur_frm.share_doc()
frappe.share.add
Thanks, Makarand
frappe.share.add did the trick