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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 22.02.2022, 14:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: How to store encrypted passwords in D365FO
Источник: http://daxonline.org/1745-how-to-sto...in-d365fo.html
==============

Here is how you can store encrypted passwords in D365FO:


1. Preferably create a new table specifically for this purpose


Created a new field of type container and EDT EncryptedField called "Password"

2. Overwrite update and insert methods of the table:



public void update() { Global::handleEncryptedTablePreUpdate(this); super(); Global::handleEncryptedTablePostUpdate(this); }public void insert() { Global::handleEncryptedTablePreInsert(this); super(); Global::handleEncryptedTablePostInsert(this); }

3. Add edit method to the table
public edit Password passwordEdit(boolean _set, Password value) { System.Exception ex; Password password = ''; try { password = Global::editEncryptedField(this, value, fieldNum(VKParameters, Password), _set); } catch (ex) { boolean exceptionNested = false; while (ex != null) { exceptionNested = true; ex = ex.InnerException; } if (_set) { warning("Failed to save the password. Please try again"); } else { warning("Failed to read the password. Please clear and re-enter the password."); } } return password; }4. On the form, change property Password Style = Yes for the password controll



To un-encrypt stored password you can use same passwordEdit method:
Info(parameters.passwordEdit(false, ''));

Standard example:
  • System administration / Setup / Email / Email parameters / SMTP settings
  • SysEmailParameters form
  • SysEmailSMTPPassword table



Источник: http://daxonline.org/1745-how-to-sto...in-d365fo.html
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sertandev: How to integrate with Dynamics 365 for Finance and Operations Blog bot DAX Blogs 0 21.08.2020 15:12
sertandev: How to receive D365FO push notifications using Azure Notification Hubs Blog bot DAX Blogs 0 04.07.2019 18:11
stoneridgesoftware: How to Create Secure Passwords and Use a Password Manager Blog bot DAX Blogs 0 13.01.2018 02:21
a33ik: How to import project from one model to another (D365FO) Blog bot DAX Blogs 0 26.12.2017 19:11
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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