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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 08.07.2009, 20:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,491 / 846 (79) +++++++
Регистрация: 28.10.2006
Arijit Basu: AX Email & URL Validation
Источник: http://daxguy.blogspot.com/2009/07/a...alidation.html
==============

All of you are aware that Standard AX does not carry out any validations on EMail addresses and URL's present in the contact details of BR/Cust/vend etc. However sometimes it becomes necessary to validate EMail addresses when they are entered in AX [DirECommunicationAddress] table. I was involved in a AX CRM implementation where it was required to validate email id's of contacts, BR when they are entered. Well if you consider the email validation piece, there are 2 parts:
1. Check if the EMail address is well formed
2. Check whether the well formed EMail id is valid.
For checking well formedness, you can use Regex (shown in this example) and for online validation of these emails, you can use any of the online email validation tools/ web services. For using online email validation web services, you can refer the whitepaper on 'Consuming external Web Services' by Helmut Wimmer
Well as for checking Well formedness, I created a small demo which validates email id's using regex:). The code is as below and is pretty simple. In this example I have used regex to validate email id's and URL's. The sample project is also attached as a download.


The small tool looks like this. There is a class in the project file which has 2 static methods that validates the input email/ url parameters using regex. You can change the regex match pattern.


The XPO and a small video is available for download below.

There is a short video on the small sample here as well :-)

Well the main trick is to ensure that all emails entered in AX is validated, so just go ahead and check the method '\Data Dictionary\Maps\DirECommunicationMap\Methods\initCommInfoFromDirParty()'
You can extend the same to this method also and if you want have an online validation here as well.
Happy DAX-ing :-)


Источник: http://daxguy.blogspot.com/2009/07/a...alidation.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Старый 08.07.2009, 21:31   #2  
Vadik is offline
Vadik
Модератор
Аватар для Vadik
Лучший по профессии 2017
Лучший по профессии 2015
 
3,631 / 1849 (69) ++++++++
Регистрация: 18.11.2002
Адрес: гражданин Москвы
Цитата:
Сообщение от Blog bot Посмотреть сообщение
All of you are aware that Standard AX does not carry out any validations on EMail addresses and URL's present in the contact details of BR/Cust/Vend etc
На всякий случай - проверка URL таки есть
\Classes\Global\isValidURL
__________________
-ТСЯ или -ТЬСЯ ?
Старый 09.07.2009, 07:02   #3  
SRF is offline
SRF
Участник
MCBMSS
Axapta Retail User
 
365 / 542 (19) +++++++
Регистрация: 08.08.2007
Записей в блоге: 1
А для проверки Email можно использовать
Classes\SysEmailDistributor\validateEmail
Старый 10.12.2012, 15:07   #4  
NetBus is offline
NetBus
Участник
 
200 / 85 (3) ++++
Регистрация: 08.07.2005
Адрес: Москва
кириллические домены
Проверка для кириллических доменов существует?
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Arijit Basu: AX 2009 Document Management & MOSS / WSS Blog bot DAX Blogs 0 23.01.2009 01:07
Arijit Basu: Installing AX 2009 Reporting Extensions in MSSQL 2008 & WIN 2008 Blog bot DAX Blogs 0 27.12.2008 17:05
Arijit Basu: AX 2009 - Quick Overview Blog bot DAX Blogs 4 19.05.2008 14:47
Arijit Basu: Infopath, Web Services & AX Integration Blog bot DAX Blogs 0 04.05.2008 23:05
Arijit Basu: Reporting & BI in AX: An Overview [Level 100] Blog bot DAX Blogs 0 07.01.2008 16:01

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:34.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.