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, ...
Answered

How to disable copy and paste option on a form controls (Real and Date)

(0) ShareShare
ReportReport
Posted on by 184

Hi Team,

I have a requirement where I want to restrict users from copy and paste from a Form controls.

I know about password style property but it will not work for date and real controls.

can someone please suggest me, how to disable copy and paste option for date and real controls. ?

is it possible?

Thanks

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi D365 Wibes,

    Copy and paste are basic Windows features which are intended to improve the productivity of users.

    What is the business reason for blocking this?

  • D365_Wibes Profile Picture
    184 on at

    Hi Andre,

    thanks for your response.

    Actually there are some sensitive data and my client does not want them to be copied and pasted from AX form.

    Hence I am looking for a way to achieve this?

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Is it acceptable for you that users couldn't use Ctrl+C, but they still can copy the value from HTML, export the data to Excel and copy it from there, save the whole page, export the page to PDF (and either share it or copy the value from there) and so on? Does it really solve anything?

    Users already have the the data on their machines, so you can't prevent them from working with it. You could merely make it a bit more complicated.

  • D365_Wibes Profile Picture
    184 on at

    HI Martin,

    Thanks for your response.

    is there any way to refrain users from doing all this via x++.

    I mean they can just view the data it is .  They should not be able to (copy, paste, export to pdf or excel)

    Please let me know if there is any way to do this

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    No, there is no way. When you send the value as HTML text to user's computer, X++ code running in the Azure data center has no control over it anymore. The user already has the data.

    You need decide whether you want to show the data to the given user or not. And when you do it, you must accept that he can copy the value, write it down on a piece of paper, save the page to a file, make a screenshot and so on...

  • D365_Wibes Profile Picture
    184 on at

    Thanks Martin,

    just one more question.

    I saw some where using C# code we can lock the mouse cursor.

    At least if we can achieve this in x++ then user cannot copy value from a control?

    Please correct me if i am wrong

    and please let me know if we can at least achieve above in x++?

  • Verified answer
    Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    No, it can't be done. X++ runs on a web server and it has no access to resources on users computers. The web page is processed by user's web browser.

    You could theoretically do something with Javascript, but it would still solve almost nothing, therefore I wouldn't invest any time to it.

  • D365_Wibes Profile Picture
    184 on at

    Thanks a lot Martin.

    If you said it cant be done then I will close this .

    Thanks again

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 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans