User Tools

Site Tools


en:renameissue

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:renameissue [2017/09/29 15:02] (current)
Line 1: Line 1:
 +TitleEngTAG ​
 +
 +
 +
 +<​HTML><​H3>​RENAME Important Topic</​H3></​HTML>​
 +
 +For the RENAME operation it was observed a singular behavior to be careful of, while we are studying a specific solution.
 +
 +**Referential integrity management in case of RENAME**
 +
 +The RENAME management is particular, since Microsoft Dynamics NAV apply the referential integrity management operations defined in the database, in addition to standard OnRename trigger code: for example, when the user apply a RENAME on a [Customer] record (changing its primary key), the same modfication is applied by NAV also to the referencing fields of [Sales Header], [Sales Invoice Header] and so on (Sell-to Customer No. etc.)
 +
 +Unfortunately,​ this management has not fully compatibility with the change detection method used by Sprinkler: in particular, Sprinkler detects and reports to the target system both the RENAME operation and all subsequent operation on others records (that could be MODIFY or even RENAME). These subsequent operation are not distinguished from the normal operations of MODIFY or RENAME, and they are considered new transactions.
 +
 +In case of RENAME + MODIFY: the target system receives a report of RENAME and replicate it directly, automatically triggering the local referential integrity management system; the next MODIFY transaction will be considered an unnecessary step, not creating a real problem nor error logs.
 +
 +In case of RENAME + RENAME: the problem arises when the modified field is referenced by a key. Let you think for example to have both the [Customer] table and the [Customer Bank Account] table set for replication:​ in this case, the key [No.] of [Customer] is referenced by the [Customer No.] field of [Customer Bank Account]. If you RENAME a Customer, the referential integrity management system also automatically performs a RENAME of the record of [Customer Bank Account] belonging to that Customer, if exists.
 +
 +Sprinkler will report both the RENAME of the Customer and the RENAME of a corresponding record of the [Customer Bank Account]. The second operation, however, will find the record __already renamed__ directly by the target NAV referential integrity management system, so Sprinkler will raise a false positive error. This error (starting from v.0.5.00) is managed and reported in the [Data Distrib. Import Error] table because the record to be renamed does not exist anymore, but this behavior can be difficult to be recognized and understood.
  
en/renameissue.txt ยท Last modified: 2017/09/29 15:02 (external edit)