Показать сообщение отдельно
Старый 18.08.2015, 11:44   #6  
syl is offline
syl
Участник
Аватар для syl
 
236 / 21 (1) +++
Регистрация: 10.06.2015
Адрес: Киев
Цитата:
Таким образом, есть версия, что вы передаете не все поля ключа замены для таблицы 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);
}

Последний раз редактировалось syl; 18.08.2015 в 12:00.