I have created my own custom table in business central.
I have a scenario in which i need to run a code after a record is successfully inserted or modified through a page.
I need to update values to second table depending upon the values after inserted or modified in the page.
There are method such as
Data related logic should never reside on page objects. Table objects have their own triggers, you are looking for OnInsert and OnModify triggers at the table level. Here's a screenshot of where you put those triggers:
I guess if you want to really do something AFTER insert/modify, you could add an event subscriber to a codeunit, and subscribe to the table's events. Create a new codeunit and start the 'teventsub' snippet, that should be self explanatory. There are OnBefore and OnAfter events for both Insert and Modify.