Closed hharing closed 4 years ago
Hi! Please take a minute to read the guidelines for this repository https://github.com/microsoft/AL and our collection of frequently asked questions https://github.com/Microsoft/AL/wiki/frequently-Asked-Questions .
As this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.
To open a support case, you can:
If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.
Describe the bug I use the SystemId to create a relation between an 'Original' record and a 'Backup' record. When I create a new record in the 'Original' table a new record is inserted with the primary key. A duplicate of this record is created in the 'Backup' table. When I enter additional information in my new record, the OnModify() trigger executes but can't find the duplicate record in the 'Backup' table when using the procedure Rec.GetBySystemId(). When I leave the newly created record, come back and do a modification, the changes are synchronized to the 'Backup' table.
To Reproduce See the print screens below and the example project.
AL Code to reproduce the issue
table 50100 "Original" { fields { field(1; "Id"; Integer) { AutoIncrement = true; }
}
table 50101 "Backup" { fields { field(1; "Id"; Integer) { AutoIncrement = true; } field(2; Name; Code[20]) { } field(3; Description; Text[50]) { } }
}
Example project GetBySystemId.zip
Expected behavior I expect that when a new record is inserted in the 'Original' table, a duplicate record will be inserted in the 'Backup' table. I also expect that the other fields are immediately synchronized to the 'Backup' table.
Screenshots Expected behavior:
Currently this is happening:
When I modify the 'Original' record, the 'Backup' record will be updated:
5. Versions: The GetBySystemId() functionality works in version: 16.1.12629.14241. This functionality is broken in the next versions: 16.2.13509.14411 16.3.14085.14363 16.4.14489.0