Цитата:
Сообщение от
lev
Если поле "Код причины" - это поле дата сорса, тогда для него надо писать скрытие и показ так же в методе visibleCollums.
Все поля, которые я хочу скрывать\показывать (их 2) это поля датасоурса.
То есть мой метод visibleCollums должен выглядеть так?
X++:
void visibleCollums()
{
// 18.02.2013 Если статус не 11 - поле код причины скрывать
if(smm.PhaseId==SalesQuotationLine.Status
&& smm.IsAskCode==NoYes::Yes)
{
SalesQuotationLine_ds.object(fieldnum(SalesQuotationLine,StatusReasonCode)).visible(true);
SalesQuotationLine_ds.write();
SalesQuotationLine_ds.refresh();
}
else
{
SalesQuotationLine_ds.object(fieldnum(SalesQuotationLine,StatusReasonCode)).visible(false);
}
//Если стоит галка "запрашивать основное предложение -показывать основное предложение)
if(smm.PhaseId == SalesQuotationLine.Status
&& smm.IsAskMainQuotationId == NoYes::Yes)
{
SalesQuotationLine_ds.object(fieldnum(SalesQuotationLine,QuotationId)).visible(true);
SalesQuotationLine_ds.write();
SalesQuotationLine_ds.refresh();
}
else
{
SalesQuotationLine_ds.object(fieldnum(SalesQuotationLine, QuotationId)).visible(false);
}
// 3816 18.02.2013
}
А что писать в методе modified поля Статус тогда?
это уже ведь будет не element, а Table_ds