Update Approaches

Core Update Paths

  1. Bulk table-level updates (set Process_ID pattern).

  2. Grouped ObjID lists (batched).

  3. Transaction mode updates (toggle include / transactional flag).

  4. Item-by-item updates (granular auditing).

  5. Change history based execution (only changed rows).

Representative Procedures

Batch Flag Pattern

UPDATE dbo.MFCustomer
SET Process_ID = 42
WHERE LastModified > DATEADD(day,-2, SYSUTCDATETIME());

EXEC dbo.spMFUpdateTableInternal
     @TableName      = N'MFCustomer',
     @Process_ID     = 42,
     @UpdateDirection= 1; -- SQL -> M-Files

Change History

When tracking incremental modifications internally (e.g. using a shadow table or triggers), spMFUpdateObjectChangeHistory can limit outbound update cost.

Multi-Value & Lookups

Normalize or resolve lookup foreign keys before marking rows for update; ambiguous or placeholder keys cause connector exceptions.

Transaction Mode

Useful for controlled testing of new property mappings:

-- Enable transaction mode (example pattern)
UPDATE dbo.MFClass
SET IncludeInApp = 2
WHERE MFID = 78;

-- Perform test update batch...

UPDATE dbo.MFClass
SET IncludeInApp = 1
WHERE MFID = 78;