RSS

No more press F5, in dynamics ax

28 Nov

How to Use Form Method — Task()

Hi,

Task() – The user performs some task in a form by using the toolbar, the menu, or the keyboard.

For Example Here I am Closing the Form by pressing TAB

Steps:

1. Create a Form Ex: Test Form

2. In Design node Take string Edit Control.

3. Override task() method in Form Methods.

4. Set the Debug Mode on Task() method. Using this debug you can find Keyboard ID (like here we are doing through TAB)

5.Then Press F5.

6.Enter some text in String Edit control.

7.It will take to you  on Debug Mode.Here (ret = super(_taskId);) you will get the Task ID.

8.Then you can write the Code..

=========================

public int task(int _taskId)

{

int ret;

 

ret = super(_taskId);// task Id will get keys ID value

if(_taskId == 2827)//2827 is the TAB ID

element.close();

 

return ret;

}

Just write this code any where in AX no need to press F5.

element.task(2876);

 

Copyed From <http://dynamicsax-blog.blogspot.in/2011/04/dynamics-ax-2012-help.html?showComment=1385625543320#c8333169855618717733>

 
Leave a comment

Posted by on November 28, 2013 in ALL

 

Leave a comment