еще есть нововведение, возврат null вместо пустой не найденной строки, такие места дополняют комментарием
X++:
static EcoResSize resolveProductVariantSize(
EcoResSizeName _sizeName,
RefRecId _productMaster,
RefRecId _productDimensionAttribute)
{
EcoResSize ecoResSize;
EcoResProductMasterSize ecoResProductMasterSize;
select ecoResSize
where ecoResSize.Name == _sizeName
exists join ecoResProductMasterSize
where ecoResProductMasterSize.Size == ecoResSize.RecId
&& ecoResProductMasterSize.SizeProductMaster == _productMaster
&& ecoResProductMasterSize.SizeProductDimensionAttribute == _productDimensionAttribute;
if (!ecoResSize.RecId)
{
// Assigning null to selectedRecord does not cause the kernel to receive a true NULL value, but rather
// just an empty record. Return NULL directly so the kernel knows that the intent is to not clear the
// selected value.
return null;
}
return ecoResSize;
}