|
|
#1 |
|
Moderator
|
Особенности настройки RLS на склад
Доброго времени суток!
![]() Может кому-нибудь пригодится. Сегодня настраивал RLS на InventLocation, в запросе зафиксировал один склад. Далее попытался создать строчку в Заказе - оформить продажу с другого склада, отличного от настроенного в RLS, строчка создается. Аналогично пытаюсь создать в Мягком Чеке, при попытке сохранить - выходит ошибка Склад такой-то не существует. Это при том что выполняется один и тот же код из SalesLine. Код генерирующий ошибку InventTableModule.checkInventLocationId X++: boolean checkInventLocationId(InventLocationId inventLocation, boolean mandatoryCheck = true) { boolean ok = true; if (inventLocation && ! InventLocation::exist(inventLocation)) ok = checkFailed(strFmt("@SYS5001",inventLocation)); .. Проблему решила доработка X++: static boolean exist(InventLocationId _inventLocation) { return _inventLocation && InventLocation::find(_inventLocation).RecId; //return _inventLocation && (select firstonly inventLocation // index hint InventLocationIdx // where inventLocation.inventLocationId == _inventLocation // ).recId != 0; } static InventLocation find(InventLocationId _inventLocation, boolean _update = false) { InventLocation inventLocation; ; inventLocation.recordLevelSecurity(true); // drc 9.02.2009 inventLocation.selectForUpdate(_update); if (_inventLocation) select firstonly inventLocation index hint InventLocationIdx where inventLocation.inventLocationId == _inventLocation; return inventLocation; }
Последний раз редактировалось DreamCreator; 19.02.2009 в 18:02. |
|
|
|
| За это сообщение автора поблагодарили: mazzy (2). | |
| Теги |
| ax3.0, axapta retail, rls |
|
|
Похожие темы
|
||||
| Тема | Ответов | |||
| Gustav: Unsorted, или Записки DAX-дилетанта - II | 39 | |||
| Внешний склад | 0 | |||
| Особенности работы RLS | 1 | |||
| Проблема с RLS и SecurityKey. | 3 | |||
| Сводное планирование и основной склад | 11 | |||
|