22.02.2022, 14:11 | #1 |
Участник
|
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:
Источник: http://daxonline.org/1745-how-to-sto...in-d365fo.html |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|