While customizing some of the forms in Dynamics Ax 2009 i come across to create a "Go To Main Table" functionality on the custom field placed on the form.
To Execute this i used following code at the design part (field>> methods>>jumpref method)
Code :
To Execute this i used following code at the design part (field>> methods>>jumpref method)
Code :
public void jumpRef()
{
Args args;
FormRun fr;
;
args = new Args(formstr(SheCRTermMaster)); //TableName
args.lookupField(fieldNum(SheCRTermMaster, TermID)); //Fields of Table
args.lookupField(fieldNum(SheCRTermMaster, Description));
args.lookupValue(this.text()); //Optional
fr = ClassFactory.FormRunClass(args);
fr.init();
fr.run();
fr.detach();
}
No comments:
Post a Comment