Posts

Showing posts from January, 2013

X++ Look ups - Existing form as a field lookup in another form

Option 1: A new field is added and that should show an already created form as its lookup. Create a new form with datasources and design. In design properties give window type = content page, style - lookup In the main form to get existing form as lookup, create a new form control and override lookup method as below. public void lookup() {    SysTableLookup          sysTableLookup ;     Query                   query           = new Query();     QueryBuildDataSource    queryBuildDataSource;     QueryBuildRange         queryBuildRange;     DimensionValue  value;     Args args;     FormRun formRun;     ;     args = new Args();     args.name("HcmWorkerEligibleLookup");     args.record(PurchReqTable);     args.parmEnum(NoYes::Yes); //     args.caller(this); //     formRun = classFactory.formRunClass(args);     formRun.init();     formRun.run();     formRun.detach();     this.performFormLookup(formRun); } In the main form init method, add below cod