Table Methods in Ax 2012
Table Methods in Ax 2012 Methods are used for adding X++ code to your application. The code in methods is also referred to as business logic. Whenever records are changed, inserted or deleted from a table various default methods are executed. We can change the default methods and by doing so we are overriding the default methods.To override a method go to the Methods node of a table, right click and choose Override Method . Below are few examples of Overriding commonly used Table methods: initValue(): If we create a new record from the table browser or a form the table method initValue() is executed. It is used to set a default value for the fields. Example (1): Let’s override intiValue for MyFirstTable and set default value for custGroupId public void initValue() { super(); this.custGroupId = "10"; } After adding this method, open table MyFirstTable through Table browser and press ctrl+n ...
Comments
Post a Comment