31.01.2017, 23:14 | #1 |
Участник
|
mfp: Subscribing to onValidatingWrite
Источник: https://blogs.msdn.microsoft.com/mfp...lidatingwrite/
============== Most event handlers are straight forward. One exception is when subscribing to a table’s onValidated and onValidating events. The trick is to realize that the DataEventArgs instance passed to the event handler, is a validateEventArgs – a specialization of DataEventArgs. Here is a template to use: [DataEventHandler(tableStr(<TableName>), DataEventType::ValidatingWrite)]public static void <TableName>_onValidatingWrite(Common _sender, DataEventArgs _e){ boolean result = true; ValidateEventArgs validateEventArgs = _e as ValidateEventArgs; <TableName> <table> = _sender as <TableName>; if (<validation>) { result = checkFailed(“Validation failed”); } validateEventArgs.parmValidateResult(result);} The platform will keep raising the... ============== Источник: https://blogs.msdn.microsoft.com/mfp...lidatingwrite/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|