Events on Dialog box

Hi all,
I am working on customer list dialog. When I click on “New” button, then the dialog box is open for new customer entry.
Is there any events/callback functions that get trigger after clicking save button on dialog?

“on_insert” hook can be helpful or maybe the “validate” hook, always of the Customer doctype, of course. You can find more information here under the “CRUD Events” subtitle.

Thanks, I will try this

Did you figure this out @saiprasad, specifically what event can be triggered when a new dialog is created for New Customer?

Answering myself in case anyone else finds this useful – one can use server scripting to manipulate fields in the new customer dialog box. For example with event before_insert:

if doc.address_line1:
    doc.country = 'countryName'
1 Like

You’ve figured out correctly. Now, you are a frappeverse citizen.