Hello community members,
I attempted to set a default value for a link field (“category” field in this case) in the onload()
function, but it doesn’t seem to be working. Any support would be greatly appreciated.
Thank you
Hello community members,
I attempted to set a default value for a link field (“category” field in this case) in the onload()
function, but it doesn’t seem to be working. Any support would be greatly appreciated.
Thank you
@thinkdigital you have set wrong value 1 you can’t set it set like kitchen or dining or change event validate or refresh
@thinkdigital select value in category and check what value is set in this field using cur_frm.doc.category
I think category document is created using category name fieldname right
Thank you for your assistance. It was a simple mistake. The value should be an integer; I previously passed it as a string. It should be:
frm.set_value('category', 1);
instead of:
frm.set_value('category', '1');