Use Case
I have a DocType named Customer Contact with a child table for Contact Numbers:
As shown above, I want the Primary Phone field to be dynamically populated based on the contact numbers in the child table.
Let’s get this done!
The Client Script
The above script is also a good example of how you can listen to row add and row remove events for a child table.
Controlling More DocField Properties
Similar to the above use case, you can use client scripts to show/hide fields, mark them read-only, and more, using the set_df_property
method: