This time I want to share another error and handling method in Dynamics 365 Business Central.
When you upload the extension to the Business Central after the customization is completed, you may encounter the following errors.
Package validation failed due to the following error(s): (1,13): error PTE0004: Table ‘XXXXX’ is missing a matching permission set.
This error will only occur when you install PTE by uploading app file from Extension Management page. If you publish directly from the Visual Studio Code, no error will be reported.
But as you know, to install PTE in production environment, we can only use the upload method from Extension Management page.
So, how do we solve this problem?
As the error report says, the problem is missing a matching permission set.
In this blog we will discuss about generating permission set which is very simple.
Open your project in Visual Studio Code.
Press “Ctrl+Shift+P” or F1 keys to open the Command palette.
Enter the following command. “AL: Generate Permission Set containing current extension objects”.
After running the command, the permission set file will be automatically generated.
Package it again.
After the extension is installed successfully, you can confirm it on Permission Sets page.
You can also assign this permission set on the user card.
I hope this will help.