1
Vote

Invalid record attribute index in getCurrentValues()

description

There is invalid index variable 'i' used in Xrm.DupDetect.getCurrentValues() function, lines 525 and 531:
524  if (record.attributes[y].AttributeType === "owner" || ...) {
525    record.attributes[i].Value = {};
526    record.attributes[y].Value.Id = result[0].Id;
...
531    record.attributes[i].Value = result;
The surrounding code indicates the correct index variable should be 'y' (?)

comments

cw wrote Aug 14, 2014 at 2:34 PM

Also, it subsequently fails when 'result' for lookup is not returned as array, so result[0] is not valid.