Hi Experts,
How to capture the screen shot in a button click event of a form .
How the car image in the form is captured and saved it as a image file or doc.
I followed the below link,but it throws an exception in WINAPI folder access.
https://www.kevinroos.be/2010/11/dynamics-ax-take-screenshots-formcontrols/
Hi Pravasti,
Your last comment is confusing. You mentioned a .png file before, but now mentioning 'like Excel export in some other file format'. This last comment does not sound like a picture. Anyway, there are screen capturing tools like mentioned by Nikolaos.
What is the functional benefit for having a button in the user interface? Also note that you can't add a new button close to the 'Office' and 'Power Apps' icon buttons on the action bar.
But if you want it in png format, what difference is there if you use normal screenshot button on your keyboard, vs develop a button in D365? Anyway Andre provided information that could be useful for you - and also I learned something new :)
No,the functionality should be something similar to export to excel in user interface,In the same way I should place the button to export the whole hierarchy to save it in some other file format.
If this is your requirement, can't you just take a screenshot with PrtScrn button?
Hi Nicolaos,
Yes I agree with your point that it will create a security issue.My requirement is to export the organisation hierarchy so thought of exporting it as a .png file.Exporting the hierarchy is quite challenging, I tried out using v2published entity so with visio I find it difficult. In a button click I need to export the same as it capture the pic using task recorder.
The blog is indeed related to AX2012 as mentioned by Nikolaos. The task recorder is able to generate word documents including screenshots, but there is a prerequisite. Have a look at the next documentation site: docs.microsoft.com/.../task-recorder
Probably you can use that technology as well for your requirement.
However, take care of the security part like mentioned by Nikolaos.
The blog that you found is related to AX2012.
I don't think that your browser has possibility to take any screenshots. That would be a big security issue. Imagine some malicious website capturing what is going on in your screen. So as far as I know, you can't implement such solution in D365FO.
Why would you want D365FO to capture the user's screen and save it in a document? What is your business requirement?
You can't use WINApi or System.Windows.Forms.Screen in D365FO since it's not a Windows application anymore (unlike AX2012 client). Remember that it's just a website that runs in a browser. And the browser can run on Windows/Mac/Linux workstation, Android phone etc. And the websites are not allowed to access your local resources.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 2,239
André Arnaud de Cal... 903 Super User 2025 Season 2
Sohaib Cheema 604 User Group Leader