FIll Select Field (ERPNext v13)


I have the following script:

let load_prices = function(frm, cdt, cdn) {
var child = locals[cdt][cdn];{
method: ‘frappe.client.get_list’,
args: {
‘doctype’: ‘Item Price’,
‘filters’: {‘item_code’: child.item_code},
‘fields’: [‘currency’, ‘price_list_rate’],
callback: function(data) {
var prices = [];
var money = new Intl.NumberFormat(‘de-DE’, { style: ‘currency’, currency: ‘RUB’ });

  	(data.message || []).forEach(function(row) {
  			'value': row.price_list_rate, 
  			//'label': row.price_list_rate + " " + row.currency
  			'label': money.format(row.price_list_rate)
  	frappe.meta.get_docfield('Opportunity Item', 'prices', = prices;


I am getting data in prices (array(‘label’: label_text, ‘value’: value_text))

But I am unable to load this data into SelectField with name ‘prices’
(this is line no worked):
frappe.meta.get_docfield('Opportunity Item', 'prices', = prices;

This script worked in ERPNext12.

I used this is:
[Tutorial] set_df_property for child table fields?

Did you try the other way mentioned in the guide you linked (cur_frm.set_df_property)?

i am try

cur_frm.set_df_property('prices', 'options', [1,2,3]);

but that doesn’t work either

after this i am print (console.log()) field object and it has no property ‘options’

in console:
var test_field = frappe.meta.get_docfield('Opportunity Item', 'prices',

 // this object haven't options property

test_field.options = ['1', '2', '3']
// ok. im see array in options

but field price (DOM) empty