cancel
Showing results for 
Search instead for 
Did you mean: 

RetrieveMatchedRecordsCommand and RetrieveLimitedRecordsCommand is differ??

Former Member
0 Kudos

first define a resultdefine:

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);

then i use RetrieveLimitedRecordsCommand,i can get the record and i can use

record.getLookupDisplayValue(fieldsMT[2])

get the field's display value;but when i use RetrieveMatchedRecordsCommand i can not use

record.getLookupDisplayValue(fieldsMT[2]) to get the display value again, i want to know if when i excute a matching strategy and get the matched record is same with normal query.

Accepted Solutions (1)

Accepted Solutions (1)

nitin_mahajan2
Contributor
0 Kudos

Simple Answer

RetrieveMatchedRecordsCommand is to get the matching result of a record and needs a Matching Id.

RetrieveLimitedRecordsCommand is to get a set of records which match your search criterion.

the reason why RetrieveMatchedRecordsCommand is not returning anything or giving an error is because you are not passing a matching Id. This command comes into use when you are using a matching strategy defined in MDM.

If your query is just to retrieve some records that match ur search criteria, use RetrieveLimitedRecordsCommand.

Regards,

Nitin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

For running matching you are using "ExecuteMatchingStrategyForNewRecordValuesCommand" command which do not actually creates a record in MDM. I think using "ExecuteMatchingStrategyCommand" inspite of "ExecuteMatchingStrategyForNewRecordValuesCommand" command will solve your problem.

Former Member
0 Kudos

oh ExecuteMatchingStrategyForNewRecordValuesCommand can only support one record a time .can not support batch!