AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 30.01.2014, 17:09   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
Ever happened that your form/page does not show records (or only one) and you are sure that it works on the real table and you don’t have ANY filters (nor by code, nor by properties) on it?

IF yes THEN

Continue reading

ELSE

Continue reading anyway!

Generally it is because you have some code in the above-mentioned trigger (and also some others) so the default-behaviour is NOT run but your code should handle the behaviour you want/need. Even putting a commented line will disable the default-behaviour.

Why this post? Well maybe you didn’t know about it, and now you do too.

But this is not the real reason of this post. I found out something I didn’t know yet.

I had this problem, was sure I was working on the real table, not having any filters and was sure I had nothing (not even a blank) in the those triggers. So was I going nuts or what?

Or maybe NAV was nuts and thought there was some code/comment on 1 of the lines and didn’t show it?

So, I exported the form as text and opened it to see what was in it. And I found that one of those triggers had a local variable in it!

Removing that local variable fixed it! That was on a NAV2009R2 version.

I also checked NAV2013 because I wanted to know if the pages had the same problem and I can confirm they have! I also tried putting a local textconstant instead of a local variable and it also generated the problem.

Conclusions (yes! 2 of them!):
  1. If your form/page does not work as expected (and the same goes for lookups on tables/forms/pages), check if you have some code/comment/local variables/local text constants in that trigger.
  2. Avoid putting local variables/tex t constants in triggers (But USE them in functions instead of global variables!)

Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:16.