Hello,
in the custom_functions.js file you can basically write free Javascript code to use for your custom buttons.
Some examples of functions are here:
/program_files/apps/dadasales/custom_functions.js
the first funciton, dadabik_copy_customer_address, copy the value of the address in the invoice address.
The function dadabik_capitalize_name capitalizes the name of the customer.
Best,