Показать сообщение отдельно
Старый 11.03.2008, 16:29   #1  
Stas[SNRC] is offline
Stas[SNRC]
Участник
 
3 / 10 (1) +
Регистрация: 11.03.2008
Ошибка времени выполнения
Недавно начал заниматься программированием в Axapta.
Используется Axapta 3.0 build #1951.7609/514-859 SP6/OP023-659

Столкулся со следующей проблемой.

В классе PurchFormLetter добавил переменную в classDeclaration^

X++:
abstract class   PurchFormLetter
extends FormLetter
{
...
    mPurchFormLetterSetup   formLetterSetup;
...
}
mPurchFormLetterSetup - таблица, в которой объявлен метод
X++:
static mPurchFormLetterSetup findPurchTable(PurchTable      _purchTable,
                                            DocumentStatus  _documentStatus)
{
...
 formLetterSetup = mPurchFormLetterSetup::find(_purchTable.PurchaseType,
                                                          _documentStatus,
                                                          TableGroupAll::All,
                                                          '',
                                                          userRelationType,
                                                          userRelation);
...
return formLetterSetup;
}
и метод
X++:
static mPurchFormLetterSetup find(PurchaseType          _purchType,
                                  DocumentStatus        _documentStatus,
                                  TableGroupAll         _vendRelationType = TableGroupAll::All,
                                  VendAccount           _vendRelation = '',
                                  TableGroupAll         _userRelationType = TableGroupAll::Table,
                                  UserGroupId           _userRelation = curUserId(),
                                  boolean               _forUpdate = false)
{
    mPurchFormLetterSetup   formLetterSetup;
    ;
    formLetterSetup.selectForUpdate(_forUpdate);
    select firstonly formLetterSetup
        where formLetterSetup.PurchType         == _purchType
           && formLetterSetup.DocumentStatus    == _documentStatus
           && formLetterSetup.VendRelationType  == _vendRelationType
           && formLetterSetup.VendRelation      == _vendRelation
           && formLetterSetup.UserRelationType  == _userRelationType
           && formLetterSetup.UserRelation      == _userRelation;
    return formLetterSetup;
}
В методе initParmPurchTable делаю следующее:
X++:
protected void  initParmPurchTable(PurchTable  _purchTable)
{
...
    formLetterSetup = mPurchFormLetterSetup::findPurchTable(_purchTable, this.documentStatus());
...
}
В правой части присвоения возвращается правильное значение record, соответственно, из mPurchFormLetterSetup.
Переменная formLetterSetup объявлена в classDeclaration тоже, как mPurchFormLetterSetup.

Все компилируется без ошибок.
Однако во время выполнения, в отладчике вылетает ошибка "Ошибка времени выполнения: неправильные типы агрументов в операции присвоения значения переменной"

Помогите, пожалуйста, совсем сбит с толку.