Показать сообщение отдельно
Старый 17.10.2019, 18:49   #2  
dech is offline
dech
Участник
Аватар для dech
Самостоятельные клиенты AX
 
643 / 347 (13) ++++++
Регистрация: 25.06.2009
Адрес: Омск
Записей в блоге: 3
It seems that your startDateTime is greater than endDateTime.
try to find out what is inside:
X++:
info(strFmt("%1 %2", startDateTime, endDateTime));
Next step is to define conditions correctly. I guess you missed braces, because AND priority is higher than OR.
X++:
        where docuRef.RefTableId    == tableNum(CustTable)  &&
              docuRef.RefCompanyId  == curext()             &&
             (docuRef.createdDateTime >= startDateTime   &&
              docuRef.createdDateTime <= endDateTime     &&
              docuRef.TypeId == #SPP) || docuRef.TypeId != #SPP
__________________
// no comments