Search This Blog

Saturday, July 26, 2014

Code to Pass Argument Values from one form to another form

Step 1: In Form A Clicked Method 

void clicked()
{
 super();
Args args = new Args();
;
args.record(TableName);
new MenuFunction(MenuItemDisplayStr(Form B),MenuItemType::Display).run(args);
}

Step 2: In class Declaration you should create a buffer for that particular table

public class FormRun extends ObjectRun
{
Table _tablelocal;
}

Step 3: In Form B init method 

public void init()
{
super();
 _tablelocal = element.args().record();
}

So by using this _tablelocal(Buffer) you can access those values anywhere in the Form B.....


Happy Dazzles..!!



Wednesday, July 9, 2014

How to pass Control Values in Form to class in AX

Step 1:

Write the method in form level like :
public str control()
{ 
return control.Text();
}

Step 2:

Write this code in class level where we need to use this value:
if(formHasMethod(args.caller(), identifierstr(MethodName)))
{ 
strcustname = args.caller().MethodName();
}


Happy Dazzles..!!