![]() |
|
|
|
Ссылка на сообщение #1 | ||
|
Участник
|
AX 4 EmplTable - Please help
Hi All
I have table axtable_1 with some information: descrition | periodFromDate | periodToDate and I have field EmplTable.field1 on each employee empl01 | field1 empl02 | field2 ... During running EmplTable I need system check axtable_1 and if system date belong to this period, system should put description to EmplTable.field1 Could you help me with this? Thank you in advance Hugon |
||
|
|
|
|
Ссылка на сообщение #2 | ||
|
MCBMSS
|
Цитата:
Сообщение от Hugon
Hi All
I have table axtable_1 with some information: descrition | periodFromDate | periodToDate and I have field EmplTable.field1 on each employee empl01 | field1 empl02 | field2 ... During running EmplTable I need system check axtable_1 and if system date belong to this period, system should put description to EmplTable.field1 Could you help me with this? Thank you in advance Hugon If I've correctly understood your question you just need put some code in update() method of EmplTable. Smth. like this: X++: if (<smth>) { select firstOnly axtable_1 where axtable_1.periodFromDate <= this.<smth> && axtable_1.periodToDate >= this.<smth>; if (axtable_1) this.field1 := axtable_1.description; } ... super();
__________________
Zhirenkov Vitaly |
||
|
|
|
|
Ссылка на сообщение #3 | ||
|
Участник
|
Thank you for your help.
This works when you save EmplTable. I need something when I am opening EmplTable, Probably I will need put some code on form not on table ![]() Hugon |
||
|
|
|
|
Ссылка на сообщение #4 | ||
|
aka edd
|
You should use a display method on EmplTable and show this method in grid.
X++: display field1_EDT myfield1(EmplTable _emplTable) { field1_EDT field1; ; if (<smth>) { select firstOnly axtable_1 where axtable_1.periodFromDate <= _emplTable.<smth> && axtable_1.periodToDate >= _emplTable.<smth>; if (axtable_1) field1 = axtable_1.description; } else { field1 = smth; } return field1; } |
||
|
|
|||
| За это сообщение автора поблагодарили: Hugon (1). | |||
|
|
Ссылка на сообщение #5 | ||
|
Участник
|
Brilliant! This works now.
Thank you for your help. Hugon |
||
|
|
|
|
| Теги |
| ax4.0 |
![]() |
Похожие темы
|
||||
| Тема | Автор | Раздел | Ответов | Последнее сообщение |
| Dynamics AX: Managing Your Supply Chain Using Microsoft Dynamics AX 2009 - Book Review | Blog bot | DAX Blogs | 0 | 31.03.2009 23:06 |
| axStart: Microsoft Dynamics AX 2009 Hot Topics Web Seminar Series | Blog bot | DAX Blogs | 0 | 06.08.2008 12:05 |
| Arijit Basu: AX 2009 - Quick Overview | Blog bot | DAX Blogs | 4 | 19.05.2008 14:47 |
| Arijit Basu: Reporting & BI in AX: An Overview [Level 100] | Blog bot | DAX Blogs | 0 | 07.01.2008 16:01 |
| Inside Dynamics AX 4.0: Usage Scenarios | Blog bot | DAX Blogs | 0 | 04.10.2007 05:15 |
| Опции темы | Поиск в этой теме |
| Опции просмотра | |
|
|