I have a dropdown with countries and I need fill another dropdown with the cities of the country selected, but I really have no idea how to make the script, im very new in ERPNext.
This is my exact issue
I have a dropdown with countries and I need fill another dropdown with the cities of the country selected, but I really have no idea how to make the script, im very new in ERPNext.
This is my exact issue
Can you explain your issues more elaborate.
I just edited my post, thanks for ur attention <3
The resource you’re looking for and an explanation:
This callback should trigger on country
.
frappe.call({
method: "dotted.path.to.python.method", // that returns a list of subdivisons when given a country argument
args: {"country": frm.doc.country // where 'country' is the name of the docfield
}).done((r) => {
frm.set_df_property("city", "options", r.message);
}).fail((f) => {
console.log(f);
});
What you’re asking for sounds simple but is actually hard to implement in an accurate way for all countries, which is why it has not been done yet in ERPNext. If you’re doing it for one country, it could be contributed as a regional module.
thanks you!, you help me a lot
Hola Sara, pudiste resolver el llenado automático?
PodrĂas detallar un poco cĂłmo lo lograste?
Gracias de antemano.
@Kaushal_Khute I’ve never written it, I was just helping Sara with a strategy to solve this problem. I don’t know what she ended up doing.
can you help me about issued ? i have same of problem’s ?
I’d be happy to help, but I can’t without more of an explanation of the specific problem you’re facing. It almost certainly should be in new thread.