Hi Everyone,
I appreciate if anyone can help me.
I have added one custom field “Task Status” in Time Log form and I want to show the Status of the Task selected in the Time Log Form.
Custom Field:
Custom Script for the Field:
Time Log Form:
But the problem is that while creating new record I am not able to see the status of the Task in Time Log.
Hi Everyone,
I know its a small issue, but I am stuck up with this, I appreciate if anyone can help me in this regard.
Regards
Ruchin Sharma
Try with this code -
cur_frm.add_fetch(“task”, “status”, “task_status”);
Thanks @priya_s but it has already been done.
@ruchin78, in your attachment you trying with cur_frm.add_fetch(“Task”, “status”, “task_status”); but instead of “Task” use “task” and try again.
@priya_s I told you that I have already resolved the problem.
Thanks for your quick response.
Regards
Ruchin Sharma
I have one more issue
I want to compare from date to the current date but the from date in Time log is of type datetype.
I appreciate if anyone can let me know how to extract date from from_date which is of type datetype?
Regards
Ruchin Sharma
Hi,
Can anyone tell me whats wrong with this code?
frappe.ui.form.on("Time Log", "validate", function(frm) {
var st_date=new Date(frm.doc.start_date);
var fr_date=new Date(frm.doc.from_time);
msgprint(fr_date); --gives null as output
msgprint(st_date); --gives the date
st_date=st_date.getDate();
fr_date=fr_date.getDate();
});
Below is the screenshot from where it should take values.