Method to write logic when Default Insert button clicked in EP


As we know in EP, insert and edit button will be generated automatically from the Ax form properties in C# design. Here is the requirement where i need to do some more process after the insertion.

Below is the sample code  :

//Insert code for CBL
public void formPersonalContactEdit_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
//check if insert is successful, then close dialog
if (e.AffectedRows == 1)
string totalseelcted = this.Category1.Text;


call the method in init()

protected void Page_init(object sender, EventArgs e)
this.AxForm2.ItemInserted += new DetailsViewInsertedEventHandler(formPersonalContactEdit_ItemInserted);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s