Показать сообщение отдельно
Старый 13.02.2009, 14:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
DeniZone: Invoking a method on a field in a form's datasource
Источник: http://denizone.blogspot.com/2009/02...-in-forms.html
==============

I needed to call the modified method on a form's datasource's field to invoke the logic, which updated a couple of fields on the form. I had defaulted a value in the field on the table's initValue()-method but this - of course - means that the modified method is not in play.
Therefore I needed to call the method in code, for which I had two options, either calling the form controls method by setting AutoDeclaration to Yes and then calling modified or calling the datasource table's field's method which I chose.

e.g. ProdTable_ds.object(fieldnum(ProdTable, ItemId)).modified();

but where to place the code? After some time I found out that if I placed it on active() of the datasource the form showed the correct information.

/Happy hacking

Источник: http://denizone.blogspot.com/2009/02...-in-forms.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.