Customer Doctype from get address

I want to using client script customer doctype in customer_primary_address filed in enter address come in address_html and display address that addresses i want to get that multiple addresses which is select from customer_primary_address that address how to get or print in console how to get

Hy @Runway

Check this code

frappe.ui.form.on('Doctype Name', {
	address: function(frm) {
		if (frm.doc.address){
        return frm.call({
            method: "frappe.contacts.doctype.address.address.get_address_display",
            args: {
                "address_dict": frm.doc.address
            },
            callback: function(r) {
                if(r.message)
                frm.set_value("address_display", r.message);
            }
        });
    }
    else {
        frm.set_value("address_display", "");
    }
	}
});

I hope It’s working

Thank You!

1 Like

That code work but i want to when i create address it new created address display in Address and Contact section break under come address_html it field type html it field in only we can see it address how to get in console all address which is store in address_hml

@Mohammadali Thankyou its totally helpful and it works so well for me :clap: