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?
Please apply and check it.
frm.doc.full_name_in_arabic = frm.doc.first_name_in_arabic + " " + frm.doc.last_name_in_arabic ;
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?
If not worked in refresh event then
refresh(frm) → before_save(frm)
when save click then automatically set full name
apply and chcek it.
What are the possible “lifecycle hooks” in these custom scripts other than beefore save? and where can I find such info?
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