<img alt="" src="https://secure.intelligent-consortium.com/791393.png" style="display:none;">

How To Create Password Protected Reports in Business Central

You may know that any user can run any report in Business Central if they have access to the related tables. But did you know you can limit access to some of these reports?

You can develop a password-protected report, which will allow only users with the password the ability to run. Learn how in the following steps.

The first step is to add a new field called “Password” on the extended “User Setup” table using the code below.

PasswordProtectReport 1

Now we will add the new field “Password” to the extended “User Setup” Page.

PasswordProtectReport 2

Next, we will create a new Single Instance codeunit to set up business logic using the code below.

PasswordProtectReport 3

Then, we will create a new standard dialog page asking the user to enter the password before running password-protected reports.

Create a new standard dialog page using all the code below.

PasswordProtectReport 4

Note: The step above is a one-time process that creates the framework for any report to be set as password-protected.

Now, we are ready to set any report in our Business Central system password-protected.

In the following example, I’m going to use the “Aged Accounts Receivable NA” report (ID:10040) to set as a password-protected report.

Using the code below, you can set any report as a password-protected report.

PasswordProtectReport 5

Now, let’s take a look at how it works when we try to run the report.

 

Learn More Security Tips by Reading
Sure-Fire Cybersecurity Tips To Keep You and Your Organization Safe

 

First, you need to set up a password on the user setup page for the users you want to allow to run a password-protected report.

PasswordProtectReport 6

Now, Run the Aged Accounts Receivable report. It will open a request page to set up filters & options as per your need.

PasswordProtectReport 7

Now, if you click any button, Send to, Print, or Preview, it will open the below dialog box to enter a password to run the report.

PasswordProtectReport 8

Voila, your Business Central report is now protected, and you can dictate which users can access this information.

Permissions are a vital part of any company’s cyber security protocol. If you need any help with your Business Central’s settings and security, give us a call, we'd love to help.

Contact Innovia Today

New call-to-action

 

Dhruv Patel

Dhruv Patel

Dhruv Patel is a Development Consultant with Innovia Consulting. He brings a wealth of experience in Business Central/NAV, coding in a wide variety of languages, and more. He holds a degree in Chemistry and a Higher Diploma Software Engineering (HDSE) from Gujarat University in India.

Related Posts