Цитата:
Таким образом, есть версия, что вы передаете не все поля ключа замены для таблицы AgreementClassification.
Тоесть мне надо еще передавать tableNum для таблици AgreementClassification? Но данное поле не отображается в списке, я выжу единственное поле Name...
Код класса AgreementClassificationKey
X++:
#AifTableNaturalKeyDataContainerTypes
[AifDataContainerTypeAttribute(#TableNaturalKey_AgreementClassification)]
class AgreementClassificationKey extends AfStronglyTypedDataContainer
{
#define.Name('Name')
#define.AgreementRelationType('AgreementRelationType')
}
public boolean existsAgreementRelationType()
{
return this.exists(#AgreementRelationType);
}
public boolean existsName()
{
return this.exists(#Name);
}
public RelationType parmAgreementRelationType(RelationType _value = 0)
{
if (!prmisdefault(_value))
{
this.set_Attribute(#AgreementRelationType, _value);
}
return this.get_Attribute(#AgreementRelationType);
}
public Name parmName(Name _value = '')
{
if (!prmisdefault(_value))
{
this.set_Attribute(#Name, _value);
}
return this.get_Attribute(#Name);
}
правильно ли будет в данном случае изменить класс таким образом:
X++:
public RelationType parmAgreementRelationType(RelationType _value = tableNum(SalesAgreementHeader))
{
if (!prmisdefault(_value))
{
this.set_Attribute(#AgreementRelationType, _value);
}
return this.get_Attribute(#AgreementRelationType);
}