June 17, 2024

Error 1067: The Process terminated unexpectedly.

Windows could not start the Microsoft Dynamics 365 Unified Operations: Batch Management Service service on Local Computer: Error 1067: The Process terminated unexpectedly. 


First, check if there’s an issue with your custom model build and synchronization process.
Ensure that your custom objects are correctly defined and synchronized.

Start by examining your custom model and its associated entities.
Look for any inconsistencies or errors in your code.
Pay attention to the specific line where the error occurs.

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

June 07, 2024

[Solved] Dynamics 365FO DB restore error Line 1 The permission 'KILL DATABASE CONNECTION' is not supported in this version of SQL Server.

Important Note: Microsoft frequently updates SqlPackage. Therefore, it’s crucial to download the latest version of SqlPackage each time you intend to use any of its commands. Download the latest SQLPackage.

Error Details: The error message for BacPac DB restore is as follows:

Dynamics 365FO DB restore error Line 1 The permission ‘KILL DATABASE CONNECTION’ is not supported in this version of SQL Server. Alternatively, use the server level ‘ALTER ANY CONNECTION’ permission.





Dynamics 365FO DB restore error Line 1 The permission 'KILL DATABASE CONNECTION' is not supported in this version of SQL Server. Alternatively, use the server level 'ALTER ANY CONNECTION' permission.

Recommended solution: 

Step 1: Navigate to the folder where your BACPAC file is saved and change the file extension from .bacpac to .zip.

Step 2: Open the zip file and copy the model.xml file to a different location. Open the copied file in a text editor such as Notepad, VS Code, or Visual Studio. (Avoid editing the file directly in the zip folder or the original file).



Model file may not load in notepad, I would prefer to open this into VS code, Visual Studio itslef or Notepad ++, 


Step 3: In the copied model.xml file, find and delete the entire Element tag that contains “Grant.KillDatabaseConnection”. Save the modified file as ModelCopy1.xml.




Step 4: Copy the modified file (ModelCopy1.xml) and paste it into the SqlPackage folder. (Download the latest version of SQLPackage)


Step 5: Change the file extension of the zip file back to .bacpac (reverse of Step 1).

Step 6: Go to the downloaded SQLPackage folder and execute the following command:

SqlPackage.exe /a:import /sf:J:\MSSQL_BACKUP\PreProdDB.bacpac /tsn:localhost /tdn:AxDB_PreProd2005 /p:CommandTimeout=1200 /TargetUser:"axdbadmin" /TargetPassword:"<DbPassword>" /TargetTrustServerCertificate:True /mfp:"ModelCopy.xml
DB import should be successful this time. 

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

May 24, 2024

Covert timestamp (1716336000000) to ISO format (2020-08-20T23:00:00Z)

To convert a timestamp in milliseconds to a date format like 2020-08-20T23:00:00Z in X++, you can use the DateTimeUtil class to convert the timestamp to a DateTime value, and then format it as needed. Here’s an example of how you might do it:

static void ConvertTimestampToDate(Args _args)
{
    // Your timestamp in milliseconds
    int64 timestamp = 1716336000000;

    // Convert the timestamp to DateTime
    DateTime dateTime = DateTimeUtil::addMilliseconds(DateTimeUtil::utcNow(), timestamp - DateTimeUtil::getSystemDateTime());

    // Convert DateTime to desired format
    str formattedDate = DateTimeUtil::toStr(dateTime, DateTimeUtil::TimeZone::UTC);

    // Print the formatted date
    print formattedDate;
    pause;
}

This code snippet assumes that the timestamp 1716336000000 is the number of milliseconds since the Unix epoch (January 1, 1970). The DateTimeUtil::addMilliseconds method is used to add the timestamp to the Unix epoch to get the correct DateTime. Then, DateTimeUtil::toStr is used to convert the DateTime to a string in the ISO 8601 format, which matches the format you provided (2020-08-20T23:00:00Z). Please adjust the logic if your timestamp is based on a different epoch or requires different handling.

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

May 20, 2024

QuickFix: Error 1064 An Exception occurred in the service when handling the control request


Windows could not start the Microsft Dynamics 365 Unified Operations: Batch Management Service service on Local Computer: Error 1064




Solution: Check event logs and you may get exact error, in my case I was trying to update some ISV and somehow, there was package refence was missign in other custom model which was casuign this error

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

May 15, 2024

Lets understand D365FO service updates

Today, we’re going to discuss some important updates from Microsoft that you should be aware of. Let’s dive in!

Service Updates

Microsoft’s service updates are continuous and touchless, providing new features and functionality. These updates eliminate the need for expensive upgrades every few years and maintain backward compatibility, so there’s no need to merge your code.

Here are some major updates on how you upgrade your system after 10.0.37 and the beginning of 10.0.39:

  • Customers can choose to pause one update at a time.
  • The number of service updates released annually is being reduced from seven to four. Customers can take up to four service updates per year and are required to take a minimum of two per year.
  • In case of multiple sandboxes, customers have to define which is the designated UAT sandbox to be used for production upgrade. A sandbox auto-update occurs seven days before the production update.
  • Microsoft is releasing four service updates annually, in February, April, July, and October.
  • In LCS, there are two auto-update dates. If customers did not upgrade their system, Microsoft will auto upgrade them based on settings in LCS. Beginning version 10.0.39, the service update auto-update window is divided into two windows that are separated by approximately a four-week gap.

The First Release Program

The First Release program is open to all customers. Customers who join it are the first, select group of customers to take the service update all the way to production. Microsoft manages the deployment of this service update to a UAT sandbox environment and then auto-deploys the update to production seven days later. Customers who participate in this program gain the benefit of having dedicated Microsoft engineers closely monitor the environments for any issues after updates are applied.

Regulatory Updates

A regulatory update is a new feature, or a change to an existing feature, that’s required by law, usually for a specific country or region. A regulatory update is always required by a specific law enforcement date (LED) and should be enabled by that date or earlier.

Expected Downtime During an Auto-update

The expected downtime for a successful update is approximately 15 minutes. However, Microsoft asks for three hours of downtime in case issues occur while the update is being applied.

PQUs

PQUs are cumulative builds of hotfixes that are delivered with near-zero downtime. PQUs follow a push model, where updates are applied to a Microsoft Dynamics Lifecycle Services environment in the background and have minimal impact on customers. Every PQU is deployed region by region, by following a “safe deployment process” that tracks issues that are found within each region during deployment. The safe deployment process helps identify and fix issues before the PQU is deployed to more regions. PQUs are 100-percent automated and contain important bug fixes that are ready after the service update is generally available.

That’s all for today! Stay tuned for more updates and don’t forget to follow us on Facebook to keep in rhythm with us.

Best, Harry

May 07, 2024

[Solved]Update script for service model: DevToolsService on machine


Hi Folks, 

I was recently updating my Build server with 10.0.39 version and encountered below error

Error: Update script for service model: DevToolsService on machine: <VM Name> 







Solution: Navigate to Service Volume drive  > DeployablePackages here find the latest folder (sort by date) and than find the file as showed in below image. 



Right click on this file and select Run in powershell. It may take few seconds only. Once finished, come back to LCS and resume the update. This should work now. 

Still not fixed...... ???

Ok that's quite strange if its still not working but possible. In this case download the entire deployable package from LCS to VM and run this scrip from this folder. On successful run try to resume, this should work. 

If you are interesting to see other possible errors and their fixes check below posts, 


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

April 12, 2024

QuickFix: "Value cannot be null. Parameter name: proxy" in DIXF

Problem: After creating a new data entity and refreshing the entity list, the new entity doesn’t appear in DIXF data entity list. Interestingly, no errors are encountered when compiling the project. However, the following error message was received when trying to add the data entity in list manually. 

Value cannot be null. Parameter name: proxy




Possible Reason: While building your project or solution exclusively, your code may not exhibit any issues. However, inspect the output window messages in Visual Studio to identify any error messages originating from objects not included in your code.

Proposed Solution: Attempt to build the entire model and rectify any errors. Upon successful build, perform a database synchronization and try again. You should then be able to view new entities after refreshing or manually add them to the list.

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

April 02, 2024

Issue while installing ExFlow ISV

Error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
   at System.Security.CodeAccessPermission.Demand()
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, AccessControlActions control, String[] fullPathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlSecureResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.ServiceModelData.InitFromFile(String filePath)
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.AXUpdateInstallerBase.CreateQuickInstallRunbookGeneratorParameter(String updatePackageFilePath, String serviceModelFile)
   at Microsoft.Dynamics.AX.AXUpdateInstallerBase.AXUpdateInstallerBase.Install(String updatePackageFilePath, Boolean versionCheck, String serviceModelFile, Boolean parallel, Boolean devInstall, Parameters parameters)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.InstallUpdate(String[] args)
   at Microsoft.Dynamics.AX.AXUpdateInstaller.Program.Main(String[] args)

ExFlow installation CMD screen


Solution:
It’s crucial to ensure that the Package zip file is unblocked before extracting it. If it’s blocked, the AXUpdateInstaller won’t be able to access the files even after they are extracted.

To verify this, one can right-click on any file in the extracted package folder, go to Properties, and look for the Unblock checkbox. If it’s unchecked, it means the file is still blocked.

This is a valuable tip for anyone working with zip files and encountering issues with the AXUpdateInstaller.


ExFlow package folder property


Just before extracting the zip file, right-click on it > Properties and tick Unblock. and try again. 


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

March 18, 2024

Database log full causing Application Access issue

Hi Folks, 

Lately last day I put a 3rd party solution on my DEV box, and the build and synch were successful. But the next morning the application was not working and it was saying (with a 'Hmmm....' sound).


Interestingly, I was able to access VM and Visual stuido was working normally. All services were running fine including IIS. Tried with certificate rotation via LCS, but nothing on the Azure portal. 

(I have still didn't realized to check on event logs :) ) It was a very strange error, after spending a few min here and there, let's check on the events and it says something like the below

{"Class":17,"Number":9002,"State":2,"Message":"The transaction log for database 'AxDB' is full due to 'LOG_BACKUP'.","ErrorCode":-2146232060,"Procedure":"","LineNumber":9,"Errors":[{"Class":17,"Number":9002,"State":2,"Message":"The transaction log for database 'AxDB' is full due to 'LOG_BACKUP'.","Procedure":"","LineNumber":9,"Source":".Net SqlClient Data Provider"}],"ConnectionId":"<345234534523453>","Source":".Net SqlClient Data Provider"}
Machine: VM001-1

The Solution:

Check the MSSQL Logs drive and this must be full and running out of space. To fix this, 
1. Open SQL management Studio on VM and connect with the local server. 
2. Right-click on AXDB and select properties. Navigate to Options and set 'Recovery model' to simple.


3.  Now, right-click on ACDB, select Task > Shrik > File, and set the below values



4. Click ok and restart the WWW service, the issue should be resolved. 



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

February 24, 2024

QuickFix: D365FO Dev Box prompting for User name and Password

Hi Folks, 

After doing get latest or build you may get the issue of accessing the environment where its keeps asking for a username and password, 




Solution:

Login into VM and check the below services if they are up and running, 

1. World Wide Web Publishing service
2. Microsoft Dynamics 365 Unified Operations: Batch Management Service
3. Microsoft Dynamics 365 Unified Operations: Data export import framework Service

Once all these services are up and running without any issues try again. 

Thanks
Harry 

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

February 22, 2024

QuickFix: Build pipeline failing at 'Prepare for Build' step

[This is my own experience which worked for me. Pay attention to other troubleshooting as well like checking for any error on other steps, checking event viewer etc]
Issue: Build pipeline failing at step of 'Prepare for build' or it's taking a very long time, it's stuck at the below step,

/LOG:"C:\DynamicsSDK\VSOAgent\_work\1\s\Backup-AX7Packages_RoboCopy.log"

Solution: If you read the previous steps carefully it may give you some more details something like the below, 


If you RDP to your build machine and check for the folder delete this from the Build machine and try to run the pipeline, if should create this from scratch. 

/LOG:"C:\DynamicsSDK\VSOAgent\_work\1\s\Backup-AX7Packages_RoboCopy.log"
/LOG:"C:\DynamicsSDK\VSOAgent\_work\1\s\Backup-AX7Packages_RoboCopy.log"
/LOG:"C:\DynamicsSDK\VSOAgent\_work\1\s\Backup-AX7Packages_RoboCopy.log"/LOG:"C:\DynamicsSDK\VSOAgent\_work\1\s\Backup-AX7Packages_RoboCopy.log"
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

January 13, 2024

QuickFix: Stop script for service model: AOSService on machine:

If you are getting errors while upgrading your tier-1 environment, trust me you are not alone, many of us facing this error say, 

Error 1: 
Stop script for service model: AOSService on machine







If you remember this is the same issue we had with the earlier version, and to fix this you have to update the VC++ runtime. You can download this from the below link and run it on our tier-1 environment (s).



Error 2:
GlobalUpdate script for service model: RetailServer on machine:(VM Name)


Let's understand why, (Or let's see what the fix is :) )

Whenever you Apply any update from LCS, it will create a package on VM local disk normally at the below location 
ServiceVolume\DeployablePackages  and you have to select the most recent folder (in case you already tried a few times with this error).

Navigate to RetailServer\Scripts and find the file name 'DropAllRetialChannelDbObjects'. 
Here is the entire path in case you need it (ServiceVolume\DeployablePackages\RetailServer\Scripts\DropAllRetialChannelDbObjects), run this SQL query on AXDB on VM and try again to apply the update. 

Tip: This SQL script sometimes takes hours and hours to finish, you can try to stop this execution and select one query at a time from the script. 


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

January 04, 2024

ENum values in BYOD

While exporting data in BYOD ENUMS are exporting with values (numerical) than its string values. 

All ENUMS are sitting in this table with their values and IDs, 
SRSANALYSISENUMS 

Sometimes this table doesn't update automatically you can write a small job to populate all EUMs in this table, below is the code

 public static void generateEnum(Args _args)
    {
        BIHelper::populateSRSAnalysisEnums();
    }

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