I am having an issue with setting default value (0) for Int field - it is not visible although when:
cur_frm.doc.my_int_field
it returns 0.
When I use
cur_frm.set_value(“my_int_field”, 0);
it is still invisible in the form.
Above is connected with add_fetch which only works when there is some value like 1 or 2 or whatever.
To mitigate it user has to pick link value two times.
How can I fix it?
it does not matter if the default value is 1 or 2. On cleared cache you have to call add_fetch twice. And of course you cannot do it one call by another - two separate value changes (tried on production & dev)
Update #2
I was able to get it working calling add_fetch on refresh event, however I find it very unelegant.
Update #3
Unfortunately when using fast entry on object of interest it does not work as well (has to pick it after it is inserted to DB).