I currently the following functions in one of my scripts to fetch the customer contact:
from frappe.contacts.doctype.contact.contact import get_contact_details, get_default_contact
I want something similar but for the default address. I search throughout the contact doctype code and all the forums but couldn’t find anything. Could anyone help me out? I’m completely lost.
To be more specific, I have a custom script that fires upon the on_save event on the Customer doctype. I want to fetch the default/primary address of the Customer open. is there something I can do with cur_frm or is there function in ERPNext that I can whitelist and use or could one of you amazing people help me with some code that would put me in the right direction.
Any help would be greatly appreciated. Thank you for reading this.