Announcements
Hi,
I am developing a custom API to extract vendor and related data using BC 19.1. My API is working fine and I would like to add audit fields such as systemCreatedAt and SystemModifiedAt
I tried adding them using Rec as well xRec but getting compilation error
Hi, Stefano is right.
More details:
Data audit system fields are added to every table in Dynamics 365 Business Central 2020 Release Wave 2 (BC17)
Hope this helps as well.
Thanks.
ZHU
Version 16 does not contain these fields. These fields are available starting from BC 17 (October 2020).
I am using version 20.3 and this works fine for me:
Unfortunately i do not have a version 16 to look at.
page 50100 vendapi { APIGroup = 'vendor'; APIPublisher = 'publisherName'; APIVersion = 'v1.0'; Caption = 'vendapi'; DelayedInsert = true; EntityName = 'vendor'; EntitySetName = 'Vendors'; PageType = API; SourceTable = Vendor; layout { area(content) { repeater(General) { field(systemCreatedAt; Rec.SystemCreatedAt) { Caption = 'SystemCreatedAt'; } field(systemCreatedBy; Rec.SystemCreatedBy) { Caption = 'SystemCreatedBy'; } field(systemId; Rec.SystemId) { Caption = 'SystemId'; } field(systemModifiedAt; Rec.SystemModifiedAt) { Caption = 'SystemModifiedAt'; } field(systemModifiedBy; Rec.SystemModifiedBy) { Caption = 'SystemModifiedBy'; } } } } }
Maybe you can try to use the lastmodifedat field and see if that works.
I see that is the field MS use in their standard API's.
sorry BC version I am using is 16.5
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156