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

Notifications

Announcements

No record found.

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
    300,911 Super User 2025 Season 2 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,598 on at
    Did you explore the Email parameter form in std system. 
  • Anton Venter Profile Picture
    20,345 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans