Skip to Content
0
Former Member
Jun 10, 2009 at 09:36 AM

when the method getLookupDisplayValue is can be used?????

35 Views

the following is the code segment:

TableId mainTableId = repository.getTableId("MT_MATS"); //主表

ResultDefinition rd = new ResultDefinition(mainTableId);

FieldId[] fieldsMT = new FieldId[5];

fieldsMT[0] = repository.getFieldId("MT_MATS", "MAT_GLDN_NUM"); //物料编码

fieldsMT[1] = repository.getFieldId("MT_MATS", "MAT_GLDN_DESC_LONG_CN"); //物料全称

fieldsMT[2] = repository.getFieldId("MT_MATS", "MAT_GLDN_5497"); //物料组(5497编码) lookup field

fieldsMT[3] = repository.getFieldId("MT_MATS", "MAT_MIS_TAG"); //信息系统标识 lookup field

fieldsMT[4] = repository.getFieldId("MT_MATS", "MAT_DEL_TAG"); //删除标记

rd.setSelectFields(fieldsMT);

ExecuteMatchingStrategyForNewRecordValuesCommand efvc = new ExecuteMatchingStrategyForNewRecordValuesCommand(repository.connPool);

efvc.setSession(repository.getNewSession());

efvc.setStrategyId(strategyId);;

efvc.setSource(newRds);

efvc.setTarget(searchTarget);

efvc.execute();

RetrieveMatchedRecordsCommand rmrc = new RetrieveMatchedRecordsCommand(repository.connPool);

rmrc.setSession(repository.getNewSession());

rmrc.setResultDefinition(rd);

rmrc.setMatchingTaskId(taskId);

rmrc.setRecordId(new RecordId(RecordId.EMPTY_ID));

rmrc.execute();

Record rdmatching = rmrc.getMatchingResult().getMatchedRecordResults()[j].getMatchedRecord();

then i execute the following code :

rdmatching.getLookupDisplayValue(fieldsMT[2])

but the result is null,i want to know why rdmatching.getLookupDisplayValue(fieldsMT[2]) = null;

who can help me thank you!!!!

Edited by: badboy on Jun 10, 2009 11:36 AM

Edited by: badboy on Jun 10, 2009 11:37 AM