Table synchronization failure in Dynamics 365 Finance & Operations due to the "SaveContent" field property.

Once, I experienced a database synchronization issue: "Table Sync Failed for Table: XXXXX. Exception: System.InvalidOperationException: Database execution failed: Column name 'XXXXXX' does not exist in the target table or view.

I had checked the table structure in my local DevBox and the mentioned field was present in the table. I checked the table structure on my local DevBox, and the mentioned field was present. When I checked the field's properties, I recognized that it has the "SaveContent" property set to "No" and is included in one of the table's indexes.

I set the "SaveContent" property set to "Yes" and performed a compilation and database synchronization. After that, the error "Table Sync Failed for Table: XXXXX. Exception: System.InvalidOperationException: Database execution failed: Column name 'XXXXXX' does not exist in the target table or view." disappeared.

Set-based operations in Dynamics 365 Dynamics 365 Finance and Operations. Cannot insert the value NULL into column 'Name', table 'TableName'; column does not allow nulls. UPDATE/INSERT fails.

When a set-based operation is used (e.g., update_recordset or insert_recordset), and an error occurs with the message "Cannot insert the value NULL into column 'Name', table 'TableName'; the column does not allow NULLs. UPDATE/INSERT fails", it means that no corresponding record was found in the joined table, so a null value was fetched and tried to be inserted into the table's column. 

It can happen if values are obtained from outer-joined data sources when there is no corresponding record in the outer-joined table, and thus a null value is retrieved.

Another case is when values are obtained from views, and those views contain calculated columns whose values can be "empty".

The solution can be using "inner join" with update_recordset and insert_recordset commands, or by using a standard "while select" clause with a view that has calculated columns.

For example, if the view is used and the code below throws the mentioned error: "Cannot insert the value NULL into column 'Name', table 'TableName'; the column does not allow NULLs. UPDATE fails"

TableForecast     tableForecast;

OperationSumView  operationSumView;

update_recordset tableForecast

    setting ItemId    = operationSumView.ItemId,
            ItemName  = operationSumView.ItemName
join ItemId, ItemName from operationSumView
    where operationSumView.RefRecId == tableForecast.RecId;

It is an example of how it can be changed to avoid the error.

while select forupdate tableForecast

join ItemId, ItemName from operationSumView
   where operationSumView.RefRecId == tableForecast.RecId
{
   tableForecast.ItemId    = operationSumView.ItemId;
   tableForecast.ItemName  = operationSumView.ItemName;
   tableForecast.update();
}

Dynamics 365 Finance and Operations: How to overwrite system fields.

In some cases, we need to modify the values of system fields. Below is a code example of how to do this. The key points are the "OverwriteSystemFieldsPermission" and "overwriteSystemFields" commands:

public void insert()

{
   // Assert and enable the system overwrite permission and metadata property.
   new OverwriteSystemfieldsPermission().assert();

   this.overwriteSystemfields(true);

   this.setAuditFieldsAnonymous();

   super();

   // Revert and disable the system overwrite permission and metadata property.
   this.overwriteSystemfields(false);
   CodeAccessPermission::revertAssert();
}

public void update()

{
   // Assert and enable the system overwrite permission and metadata property.
   new OverwriteSystemfieldsPermission().assert();

   this.overwriteSystemfields(true);
   this.setAuditFieldsAnonymous();
     
   super();
 
   // Revert and disable the system overwrite permission and metadata property.
   this.overwriteSystemfields(false);
   CodeAccessPermission::revertAssert();
}

public void setAuditFieldsAnonymous()

{
   utcdatetime  now = DateTimeUtil::utcNow();
   SysDictField createdByField;
   SysDictField createdDateTimeField;
   SysDictField modifiedByField;
   SysDictField modifiedDateTimeField;

   createdByField = new SysDictField(tableNum(Table), 

                                    fieldNum(Table, CreatedBy));
   createdDateTimeField = new SysDictField(tableNum(Table), 
                                           fieldNum(Table, CreatedDateTime));
   modifiedByField = new SysDictField(tableNum(Table), 
                                      fieldNum(Table, ModifiedBy));
   modifiedDateTimeField = new SysDictField(tableNum(Table), 
                                            fieldNum(Table, ModifiedDateTime));
           

   if (createdByField.isSQL())

   {
      this.(fieldNum(Table, CreatedBy)) = '';
   }

 

   if (modifiedByField.isSQL())
   {
      this.(fieldNum(Table, ModifiedBy)) = '';
   }

 

   if (modifiedDateTimeField.isSql())
   {
      this.(fieldNum(Table, ModifiedDateTime)) = now;
   }

 

   if (this.RecId == 0 && createdDateTimeField.isSql())
   {
      // CreatedDateTime is only set on insert.
      this.(fieldNum(Table, createdDateTime)) = now;
   }
}

Lifecycle Services (LCS) portal retirement announcement

Based on announcements regarding Microsoft Dynamics 365 Finance & Operations, February 16, 2026, marks a major shift in how environments are managed, with the transition of key capabilities from Lifecycle Services (LCS) to the Power Platform Admin Center (PPAC). 

Creating all new D365 Finance and Operations (F&O) cloud implementation projects will be routed through the Power Platform Admin Center (PPAC), rather than created in the LCS, which has been the traditional approach for years. As a result, environment actions, support motions, and governance checks will be moved to be in PPAC, not assumed from LCS.

Environment actions, support motions, and governance checks will be moved to be in PPAC, not assumed from LCS.

Existing projects, on-premises deployments, Commerce, and AX 2012 upgrades will continue to use LCS for the time being. To migrate existing LCS projects to PPAC, Microsoft provides a guide.

D365 SysOperation framework. The "SysOperationJournaledParameters" attribute. Adding a batch job as a subtask to the main batch job.

We have a class that is implemented using the SysOperation Framework and needs to be added to the "Batch task" form (System Administration > Batch > View Task) so that we can define execution parameters. For example, we need to set dependencies, sub-tasks or the execution sequence between batch jobs. In this case, we need to use the "SysOperationJournaledParameters" attribute.

I found an example in the "Automatic release to warehouse" operation and adjusted it to my needs. I made the following modifications: 

1. Added the "SysOperationJournaledParameters" attribute to the controller class:

[SysOperationJournaledParameters(true)]
public class MyControllerClass extends SysOperationServiceController
{
}

2. Added the service class and its methods to the "construct" method:

public static SysOperationController construct(Args _args)
{
    SysOperationController controller = new MyControllerClass(
                                                                            classstr(MyServiceClass),
                                                                            methodstr(MyServiceClass, process),
                                                                            SysOperationExecutionMode::Synchronous);
    controller.parmArgs(_args);
    controller.parmDialogCaption(MyControllerClass::description());
 
    return controller;
}

Ax 2012 data upgrade in Tier-1 development environments(CHE). Error: System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.

During the data upgrade from AX2012 to D365FO I got the following error in step 3 on /DataUpgrade/PreReqs/AdditiveDbSync:

System.IO.FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

The workaround to solve the error was to copy the System.ValueTuple.dll file from "K:\AosService\PackagesLocalDirectory\bin\ModelUtilDlls" to "K:\AosService\PackagesLocalDirectory\bin"

There is a registered issue 1029905 on the LCS portal regarding this error.

Ax 2012 data upgrade in Tier-1 development environments(CHE). The status is in "In Progress" for a long time.

During the data upgrade from AX2012 to D365FO 10.0.42 version I faced an issue in step 3 (Post Sync\ExecuteScripts). The status was in "In Progress" for more than 12 hours. 

But when I checked the process, there were no pending post-sync scripts to run, and all post-sync script were completed.

I checked the status of the process with a query: select * from DBUPGRADE.SERVICINGSTEP

I decided to change the status of the «ExecuteScripts» step to complete it manually, since there were no pending post-sync scripts to run:

UPDATE DBUPGRADE.SERVICINGSTEP SET STATUS=2 WHERE PATH = '/DataUpgrade/PostSync/ExecuteScripts';

Then I closed the cmd window and re-ran step 3 but I got an error:

I closed the datupgradebatch.exe process using the task manager, re-ran step 3 and the data upgrade process was resumed and completed successfully.

Ax 2012 data upgrade on the self-service environment. The error "There is no row at position 0."

During the Ax 2012 data upgrade, after providing connection details to Ax2012 SQL Server, the migration tool closed and I received the following error message in the log file.

2025-08-17 13:15:09.261 -02:00 [Information] Reading version check query started. 
2025-08-17 13:15:12.199 -02:00 [Information] Executing the version check completed. 
2025-08-07 13:15:12.199 -02:00 [Error] There is no row at position 0. 
System.IndexOutOfRangeException: There is no row at position 0. at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at Microsoft.Dynamics.Servicing.DataUpgrade.AxConsoleApp.MenuHelper.
<EnvironmentSetup>d__17.MoveNext() in C:\__w\1\s\src\Migration.AxConsoleApp\Microsoft.Dynamics.Migration.AxConsoleApp\MenuHelper.

I spent some time understanding what had happened and was able to solve the problem by restarting the SQL and AOS services.

Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment. How to perform an IIS reset.

The fastest way to restart AOS Service in Unified Developer Experience (UDE) environment is to Start/Stop FO Online Debugger in Visual Studio.

I figured it out based on my experience, but later, I found some useful tips here: https://learn.microsoft.com/en-us/power-platform/developer/unified-experience/finance-operations-faq#stopping-debugging-restarts-the-runtime

Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment is unavailable. Error 502.

In some cases, the Dynamics 365 Finance and Operations Unified Developer Experience (UDE) environment may not be available, and returns:

Error 502
Gateway Request Id: be5bdd0b-0e8c-4479-bd57-a91a61123c56
Request Affinity: AOS1

Based on my experience, there are several options to fix this error:

  • Restart the services by switching the environment to Administration mode and then switching it back.
  • Deploy a model when this happens.
  • Wait for some time and it will come back online automatically.

Table synchronization failure in Dynamics 365 Finance & Operations due to the "SaveContent" field property.

Once, I experienced a database synchronization issue: " Table Sync Failed for Table: XXXXX. Exception: System.InvalidOperationException...