How to set value in list js

Hello all,
cur_frm.set_value(“status”, ‘Expired’); does set value works in list.js…

Please mention :

  1. Which doctype’s list view is in the question ?
  2. What are exactly trying to achieve ?
  3. What is your ERPnext and Frappe version ?
  1. Doctype - Batch,
  2. I am trying to set value for the field called status if date is expired then status field has to be set as ‘Expired’ based on the status field indicator has to be display as ‘Expired’
  3. ERPnext verison - v10.1.53 (master),
    Frappe version - v10.1.48 (master)

This already being controlled by a file called batch_list.js which you can find in batch, under folder doctype of stock module.

Please check that.

Also, are you trying to set this status in a bulk fashion via the list directly, as it can be done for Sales Order ?

Thanks for the reply, I had checked but what i need is if expirydate has been ‘Expired’ then there is field ‘Status’ here i have to set it has ‘Expired’.

Oh. You’d have to access the doctype either by JS or Python then and set it.

I already tried to set value in js value has been set into status field but it throws error “Batch cannot be manually created” … any example to set and it should be in displayed in listview as well


I think then what this error says is true. It is probably linked to the Manufacturing process.

Is there any other possibility to set value and display in list view as well…