I added two contacts for a supplier.In purchase order I have a select field “contact”.If select a supplier need to get supplier contacts as options for field contact in purchase order.How?
I need all contacts added for that supplier as options for purchase order contact select field.
NCP
April 30, 2024, 7:47am
5
Here when i select supplier I need that supplier whole contacts in supplier contacts options
NCP
April 30, 2024, 9:00am
7
Customization and logic are required.
reference:
Hi @kdevloper ,
Please apply it.
frappe.ui.form.on("Product Sync", {
onload: function() {
frappe.model.with_doctype('Item', () => {
var options = $.map(frappe.get_meta('Item').fields, function(d) {
if (d.fieldname && frappe.model.no_value_type.indexOf(d.fieldtype) === -1) {
return { value: d.fieldname, label: __(d.label) };
}
return null;
});
frappe.meta.get_docfield("Product Syn…
How to get selected supplier contacts in purchase order through client script
NCP
April 30, 2024, 11:41am
10
You have to customize it in your own way by lifting the logic from the reference I gave you.