June 14, 2022, 12:04pm
I didn’t find much useful examples on:
So I am trying to figure out how to use custom scripts.
What I am attempting to do is simply: concatenating the value first_name_in_arabic with last_name_in_arabic
Is there any documentation that reveals all the possible methods I can use there?
June 14, 2022, 12:11pm
Please apply and check it.
frm.doc.full_name_in_arabic = frm.doc.first_name_in_arabic + " " + frm.doc.last_name_in_arabic ;
June 14, 2022, 12:15pm
Ah yes, the missing " " wasn’t the issue.
My issue that it’s not doing anything in that target form when I filling first name in arabic and last name in arabic; it is not filling automatically the full_name_in_arabic field.
and no error is thrown, nothing. What am I missing?
June 14, 2022, 12:21pm
If not worked in refresh event then
refresh(frm) → before_save(frm)
when save click then automatically set full name
apply and chcek it.
June 14, 2022, 12:23pm
What are the possible “lifecycle hooks” in these custom scripts other than beefore save? and where can I find such info?
June 14, 2022, 12:24pm
June 14, 2022, 1:34pm
In addition to those server-side hooks, the client side hooks are here:
you can use validate() instead of refresh()
let full_name_in_arabic = frm.doc.first_name_in_arabic + " " + frm.doc.last_name_in_arabic;
This will update value in full_name_in_arabic once the document is saved