web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Encryption & Decryption on a string field on Vendor form using x++

(0) ShareShare
ReportReport
Posted on by 63
Hi All,
I need to encrypt a existing string field on vendor form which is BankAccount (lookup string field). as soon as I choose a bank account, it should be encrypted before saving into database & that hashed value should be visible on the field value not the actual value. then their will be a button on same vendor form, after clicking on it, it should show a dialog box type with the actual(decrypted) value of the encrypted field.
I tried to use this method - ediltEncryptedField from Global class in modifiedField method using COC but it is accepting only container type field in its FieldId params. I tried passing string field but getting casting error on that.
Suggests some solution for this.
 
Thanks & Regards,
Harshit
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,439 Super User 2026 Season 1 on at
    Hi Harshit,
     
    For encryption, you would need a container field. Note that other processes also need the vendor bank account, e.g. payment files to be sent to a bank.
    What is the business reason for encrypting the bank account field? In case particular users are not allowed to see the value, you can use table and field permissions as part of the security to hide values. You can read more about the security approach here: Securing a menu item is not enough - table permissions - Dynamicspedia
     
     
  • Deepak Agarwal Profile Picture
    8,602 on at
    Did you explore the Email parameter form in std system. 
  • Anton Venter Profile Picture
    20,635 Super User 2026 Season 1 on at
    I agree with Andre, use security to secure access to the bank account. Perhaps combined with custom display methods that mask the bank account in certain forms. The issue with the editEncryptedField method, besides it requiring a container data type, is that it uses encryption keys per enviroment, so when you move the database to another environment e.g. UAT, the encrypted data cannot be decrypted because the encryption key is different. And, if the data is encrypted, the system cannot use the data unless it's decrypted.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 517 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 440

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans