How to fetch Doctype Information

I have created one Doctype same as In ITEM which is using the Purchase Order, Purchase Invoice, Sales Invoice etc. when we are selecting any item from item list(link) than automatically item related information populated in other field like ITEM NAME,DESCRIPTION,UOM etc. same i want to use in my new DocType. For that i have write the code in Doctype.js


frappe.ui.form.on("Sales Invoice", "amended_from",
    function(frm) {
        frappe.call({
            "method": "frappe.client.get",
            args: {
                doctype: "Flat Master",
                name: frm.doc.amended_from
            },
            callback: function (data) {
                frappe.model.set_value(frm.doctype,
                    frm.docname, "flat_name",
                    data.message.flat_name
                    + (data.message.area ?
                        (" " + data.message.area) : ""))
            }
        })
    });

But i am not getting the information related with that Doctype. I am new in Frappe so don’t know more So please give me the complete solution for this
Thanks in Advance

@DNGupta If you want “complete” solution, you should engage a freelancer

See the structure of data in your callback that will help you debug.

Ok thanks for the reply sir