How to save or fetch data in other doctype

can someone help me with a custom script that will save the value of cbm to be shown in other doc type.
the code is working fine, but i have to fetch the value and to be shown in other doctype

frappe.ui.form.on(“Stock Ledger Entry”,“onload”,function(frm, cdt, cdn){
var d = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, “total_cbm”, d.weight_per_unit * d.actual_qty);
frm.refresh_field(“total_cbm”);
});