Dialog Override Modified mehtod in Ax 2012

class Test_DialogField extends RunBasebatch
{
CustAccount CustId;
DialogField dialogCustId;
DialogField dialoglName;
Dialog dialog;

#define.CurrentVersion(1)

#localmacro.CurrentList
CustId
#endmacro
}

public container pack()
{
return connull();
}

public boolean unpack(container packedClass)
{
return true;
}

static void main(Args args)
{
Test_DialogField tmpDialogField = new Test_DialogField();
;

if (tmpDialogField.prompt())
tmpDialogField.run();
}

public void dialogPostRun(DialogRunbase tmpdialog)
{
super(tmpdialog);
tmpdialog.dialogForm().formRun().controlMethodOverload(true);
tmpdialog.dialogForm().formRun().controlMethodOverloadObject(this);
}

protected Object dialog()//DialogRunbase tmpdialog, boolean forceOnClient)
{
;
dialog = super();//tmpdialog,forceOnClient);
dialogCustId = dialog.addFieldValue(typeid(CustAccount),”Customer”, “Customer”);
dialoglName = dialog.addFieldValue(typeid(Name),”Name”, “Name”);

return dialog;
}

public boolean fld1_1_modified()
{
FormStringControl control = dialog.formRun().controlCallingMethod();
boolean isFieldModified;
;
isFieldModified = control.modified();

if(isFieldModified)
{
dialoglName.value(custTable::find(control.text()).Name);
}
return isFieldModified;
}

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s