spMFUpdateSynchronizeError

Returns
  • 1 = Success

  • -1 = Error

Parameters
@TableName varchar(100)
  • Class table name (e.g., ‘MFCustomer’)

@Update_ID int
  • Update run identifier to correlate to prior run

  • Input: the Update_ID of the run that raised the synchronization errors. Only rows of the class table with Process_ID = 2 and this Update_ID are processed; NULL processes nothing

@RetainDeletions bit (optional)
  • Default = 0 (No)

  • Set to 1 to retain deletions in class tables

@IsDocumentCollection bit (optional)
  • Default = 0 (No)

  • Set to 1 if the class refers to a document collection

@ProcessBatch_ID int (optional, output)
  • ProcessBatch ID for logging

@Debug int (optional)
  • Default = 0

  • 1 = Standard Debug Mode

  • 101 = Advanced Debug Mode

Purpose

Reprocess and fix synchronization errors from a previous update run for a specific class table.

The procedure acts only when MFClass.SynchPrecedence is set for the class: 1 refreshes the objects from M-Files, 0 updates M-Files from SQL. With no precedence set it changes nothing. spMFUpdateTable calls it at the end of a run that raised synchronization errors when precedence is set.

Examples

DECLARE @Update_ID INT,
        @ProcessBatch_ID INT;

-- the run that raised the synchronization errors
SELECT @Update_ID = MAX(Update_ID)
FROM dbo.MFCustomer
WHERE Process_ID = 2;

EXEC dbo.spMFUpdateSynchronizeError
     @TableName       = 'MFCustomer',
     @Update_ID       = @Update_ID,
     @RetainDeletions = 0,
     @IsDocumentCollection = 0,
     @ProcessBatch_ID = @ProcessBatch_ID OUTPUT,
     @Debug           = 0;

Changelog

Date

Author

Description

2026-11-16

AC

Correct @Update_ID to an input and set it in the example

2022-09-02

LC

Update to include RetainDeletions and DocumentCollections

2022-08-03

LC

fix bug on calling proc in sync precedence

2022-08-03

LC

Updating debug logging to aid error trapping

2019-08-30

JC

Added documentation

2018-08-29

LC

Include this process as a part of the logging of MFUpdateTable

2018-08-23

LC

Update procedure to only process the errors from the prior update run