Pages

December 20, 2020

[Solved] Table browser not working

Hi Folks,

 Few days back I got a new dev box which was recently rolled out by one of a colleague.  All of a sudden it started behaving strangely. Whenever browsing a table I was getting below error.

 

Access Denied: You do not have sufficient permissions to open the menu item systablebrowser. Please contact your system administrator.

I double checked all the access, I got full admin access on this server but still same issue. This created more confusion when I was trying to run the debugger, I started getting below error. 

Access Denied: You do not have sufficient permissions to open the menu item sysclassrunner. Please contact your system administrator.

So to overcome this issue, double-check if the developer configuration key is enabled, in my case it was disabled and that was the root cause of these problems.

 


Now if you see the message on top of this form (Sysadmin > setup > License configuration) it is saying you cannot edit any record in the form until the server is in maintenance mode.

(See this link for how to enable maintenance mode in D365FO)

So first you need to enable maintenance mode on this server and then enable the development key.





Once than done, make sure you disable maintenance mode. And give it a try now, you should be able to browse a table. ( Also, the debugger is working fine as well 😊 )

Merry Christmas to all. Have a great holiday ahead.

-Harry 

Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

December 14, 2020

QuickFix -16:[Solved] ComputedFieldMethod: Method return type of 'ExtendedDataType' is invalid; expected values(s): 'String'

While adding a computed field and creating a method for the same, getting below error for method. 

ComputedFieldMethod]:Method return type of 'ExtendedDataType' is invalid; expected values(s): 'String'

Solution: You need to double-check the method signature and it must look like below

public static server str myCal()

    {

        str mycal;

//Business logic

        return mycal;

    }

Build your solution and give it a try.

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

November 09, 2020

Build model through command line

Hi Folks, 

Below are some useful commands for D365FO.

Get List of all workspace

tf.exe workspaces /owner:* /computer:{Workspace} /collection:https://{TFS}.visualstudio.com

Delete a workspace

tf workspace /server:https://{TFS}.visualstudio.com/defaultcollection /delete "{Workspace};{Owner}"

You need to out email id of the owner, user id will not work.

compile model

C:\AosService\PackagesLocalDirectory\Bin\Xppc.exe -verbose -apixref -metadata=C:\AosService\PackagesLocalDirectory -modelmodule=<model_name> -referenceFolder=C:\AosService\PackagesLocalDirectory -xreffilename="C:\AosService\PackagesLocalDirectory\<model_name>\<model_name>.xref" -refPath=C:\AosService\PackagesLocalDirectory\<model_name>\bin -output=C:\AosService\PackagesLocalDirectory\<model_name>\bin -log=C:\<log_path>\Dynamics.AX.<model_name>.xppc.log -xmllog=C:\<log_path>\Dynamics.AX.<model_name>.xppc.xml

compile model best practices

C:\AosService\PackagesLocalDirectory\Bin\xppbp.exe -metadata=C:\AosService\PackagesLocalDirectory -packagesRoot=C:\AosService\PackagesLocalDirectory -module=<model_name> -model=<model_name> -all -log=C:\<log_path>\Dynamics.AX.<model_name>.xppbp.log -xmllog=C:\<log_path>\Dynamics.AX.<model_name>.xppbp.xml

compile labels

C:\AosService\PackagesLocalDirectory\Bin\LabelC.exe -metadata=C:\AosService\PackagesLocalDirectory -modelmodule=<model_name> -output=C:\AosService\PackagesLocalDirectory\<model_name>\Resources\ -outlog=C:\<log_path>\Dynamics.AX.<model_name>.labelc.log -errlog=C:\<log_path>\Dynamics.AX.<model_name>.labelc.err

compile reports

C:\AosService\PackagesLocalDirectory\Bin\ReportsC.exe -metadata=C:\AosService\PackagesLocalDirectory -modelmodule=<model_name> -LabelsPath=C:\AosService\PackagesLocalDirectory -output=C:\AosService\PackagesLocalDirectory\<model_name>\Reports\ -log=C:\<log_path>\Dynamics.AX.<model_name>.reportsc.log -xmllog=C:\<log_path>\Dynamics.AX.<model_name>.reportsc.xml

sync db

C:\AosService\PackagesLocalDirectory\Bin\SyncEngine.exe -syncmode=fullall -metadatabinaries=C:\AosService\PackagesLocalDirectory -connect="Data Source=ERP-BL-D-APP-1;Initial Catalog=AxDB;Integrated Security=True;Enlist=True;Application Name=SyncEngine" -fallbacktonative=False -raiseDataEntityViewSyncNotification

This post is referred to here.

 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

October 23, 2020

Important website links for Azure

Hi Folks,

Here are a few important links that may help while working on Azure services.

Ø Azure for student: Free Azure credit for Azure services

Ø Free Azure account for demo and learn

Ø Azure status - Microsoft Azure: To check different azure services region/data center status. 

Ø  Logic Apps pricing: Azure Logic app pricing.

Ø Azure Latency Test: Azure services latency test.

OOverview of Azure security benchmark 

Ø Azure Speed Test 2.0: Measuring the latency from your web browser to the Blob Storage Service in each of the Microsoft Azure Data Centers.

Ø Sizes for virtual machines in Azure: Details of available sizes and options for the Azure virtual machines you can use to run your apps and workloads.

Ø Linux Virtual Machines Pricing:

Ø Azure products: All Microsoft Azure services landing page.

Ø Cloud Services pricing

 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

October 16, 2020

Power automate loopback issue

Hello There, 

Power automate is a really powerful tool for integration requirement in Dynamics 365 FO, I have been using power automate for a long time by now. Recently faced an issue while trying to call a D365FO trigger, the system was calling twice. While contacting MS, they have suggested the below hotfix to apply to the target FO environment. That worked for me. 

Happy to share the details in this post,  Login into your LCS account, select the project. Now go to the Issue search tool and search by KB 4556115, you should get the below details. 


Pl, note while creating a deployable package, double-check your environment version from where you are creating this package and the target environment version.  

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta


October 05, 2020

QuickFix -15:[Solved] Error The data value violates integrity constraints.

Getting below error while importing a file using the Data management framework. 

Issue: 

"The data value violates integrity constraints"

Possible solution: 

Check two things primarily. 

1. If any mandatory fields are blank in file

2. Set if a unique filed contain duplicate values in file.


-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 17, 2020

[Solved] D365FO logic app connector error: Failed with error: 'The browser is closed.'. Please sign in again.


Hi Folks,

I hope all of us keep themself safe during this tough time and utilizing this to learn something new and enhance your skill sets. 

With that note, let me share one of my findings with the Logic Apps issue. I was trying to sign in D365FO connector and getting below error

Failed with error: 'The browser is closed.'. Please sign in again or choose another connection.



Well, there can be many solutions to it, try the below steps, 

1. Check the user is available in the respective D365FO environment with proper access. 
2. Check if there are any API created during one of the tries, and delete it.
3. Clear browser cookies. 
4. Try ti use Edge than other browsers.

Also, if you are working with multiple domains, I mean your azure portal is on a different domain and D365FO is on a different domain try below, 

When you login into https://portal.azure.com/ uncheck below checkbox, and click, 'No'.


Now when you must be able to sign in D365FO connector with other domain without any issue. 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

September 04, 2020

QuickFix -14:[Solved] Error "error occurred while doing bulk copy from temp table to entity table"

While importing a file using Data entity getting below error, 

 Error message:

"Error occurred while doing bulk copy from temptable to entity table- '0' '<Entity Name>' record(s) inserted in staging"

Solution

Normally this error comes when there are issues with data. Check your input file look for field values that are part of the primary key. There must be some duplicate value where the system is throwing the above error. 

-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

August 10, 2020

How to Import Tier 1 box Data backup to Tier 2 Box

Hi Folks,  

All tier 2 server we have to use bacpac file to restore a database from tier 1 server which has .bak file when doing a DB export. In this post, we will see how to restore the database from tier 1 server to tier 2 server.

(Know more about Cloud offering and different tiers)

Step 1: Create a copy of your DB.

Use below script,

BACKUP DATABASE [AxDB] TO DISK = N'D:\Backups\axdb_golden.bak' WITH NOFORMAT, NOINIT,

NAME = N'AxDB_golden-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10

GO

RESTORE DATABASE [AxDB_CopyForExport] FROM DISK = N'D:\Backups\axdb_golden.bak' WITH FILE = 1,

MOVE N'AXDBBuild_Data' TO N'F:\MSSQL_DATA\AxDB_CopyForExport.mdf',

MOVE N'AXDBBuild_Log' TO N'G:\MSSQL_LOGS\AxDB_CopyForExport_Log.ldf',

NOUNLOAD, STATS = 5

 

Choose master from the dropdown, so the new DB will create on the root folder on inside the AXDB. Make sure you update all the paths as per your machine. This script must create a new database named AxDB_CopyForExport.

 


Step 2: Now we need to make some changes in this Database. You should run this script for a successful Export/Import of database.

 Here is the complete script, which you need to run on new DB i.e. AxDB_CopyForExport .

update sysglobalconfiguration

set value = 'SQLAZURE'

where name = 'BACKENDDB'

update sysglobalconfiguration

set value = 1

where name = 'TEMPTABLEINAXDB'

drop procedure if exists XU_DisableEnableNonClusteredIndexes

drop procedure if exists SP_ConfigureTablesForChangeTracking

drop procedure if exists SP_ConfigureTablesForChangeTracking_V2

drop schema [NT AUTHORITY\NETWORK SERVICE]

drop user [NT AUTHORITY\NETWORK SERVICE]

drop user axdbadmin

drop user axdeployuser

drop user axmrruntimeuser

drop user axretaildatasyncuser

drop user axretailruntimeuser

drop user axdeployextuser

 

--Tidy up the batch server config from the previous environment

DELETE FROM SYSSERVERCONFIG

 

--Tidy up server sessions from the previous environment

DELETE FROM SYSSERVERSESSIONS

 

--Tidy up printers from the previous environment

DELETE FROM SYSCORPNETPRINTERS

 

--Tidy up client sessions from the previous environment

DELETE FROM SYSCLIENTSESSIONS

 

--Tidy up batch sessions from the previous environment

DELETE FROM BATCHSERVERCONFIG

 

--Tidy up batch server to batch group relation table

DELETE FROM BATCHSERVERGROUP

 

-- Clear encrypted hardware profile merchant properties

update dbo.RETAILHARDWAREPROFILE set SECUREMERCHANTPROPERTIES = null where SECUREMERCHANTPROPERTIES is not null

 Above scrip will; 

I. Set the SysGlobalConfiguration flag to inform the application that the database is Azure-based.

II. Remove a reference to tempDB in the XU_DisableEnableNonClusteredIndexes procedure. References to tempDB aren't allowed in an Azure SQL database. The database synchronization process will re-create the reference later.

III. Drop users, because Microsoft Windows users are forbidden in Azure SQL databases. Other users must be re-created later so that they're correctly linked to the appropriate sign-in on the target server.

IV. Clear encrypted hardware profile merchant properties.

Step 3: Export database as bacpac file.

Open CMD as admin (it will work without cmd as well), and go to path “C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\”

Run below command,

SqlPackage.exe /a:export /ssn:localhost /sdn: AxDB_CopyForExport /tf: J:\MSSQL_BACKUP\GoldenConfig01082020.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false

·         \ ssn (source server name) – The name of the SQL Server to export from. For the purposes of this topic, the name should always be localhost.

·         sdn (source database name) – The name of the database to export.

·         tf (target file) – The path and name of the file to export to. The folder should already exist, but the export the process will create the file.

 

Check all the default location carefully and run it. Don’t put any space while putting these values, (refer below image) else it will throw an error


Step 4: Upload bacpac file to LCS

Login into lcs.dynamics.com and Go to assets library > database  backup > click on + button

Select your file and select the backup type as ‘Product database (SQL Server or .bak)’ and upload this file.

Step 5: Import database to target tier 2 box.

Go to LCS and select a target T-2 box,

Click on details

Go to maintenance > Move database > Import a bacpac > select your file from the asset library


Further reference; Click here.

Cheers!!!

Harry