Sunday, 27 September 2020

Error importing database: could not load package from dynamics 365 'D:\Exportedbacpac\swelltestupgradebackup.bacpac'. File contains corrupted data.

 I was getting the below error while trying to import database into DEV environment.


Error importing database: could not load package from dynamics 365 'D:\Exportedbacpac\swelltestupgradebackup.bacpac'. File contains corrupted data.


Solution:

-> Go to below link and download "Windows .NET Core" Zip file and extract it to C:\Temp.

https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15


From there, instead of using the Sqlpackage.exe under C:\Program Files (x86), please use the Sqlpackage.exe in C:\Temp\Sqlpackage-dotnetcore


Your import query will look like below

C:\Temp>SqlPackage.exe /a:import /sf:D:\Exportedbacpac\Testupgradebackup.bacpac /tsn:localhost /tdn:AxDB_fromProd1 /p:CommandTimeout=0

Tuesday, 8 September 2020

Class names when you validate or simulate a vendor payment journal in dynamics AX/ 365 finance and operations

 Below is the class name when you validate a vendor payment journal.

LedgerJournalCheck


Below are the class name when you simulate a vendor payment journal.

LedgerJournalPost

LedgerJournalCheckPost

LedgerJournalTransUpdateVend


Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...