Get or set the timestamp of the last synchronized record for a selected entity. This timestamp is mainly used for synchronizing only the Business Central records, that have changed from the last run.
Note: Prior to Business Central version 17 (2020 wave 2) there is no SystemModifiedAt field in tables. You need to use SQL timestamp fields, which are
BigInteger
type, so use this instead ofDateTime
for function parameters and return value. For more details see Synchronize data guideline.
Enum "Provider ID RWU"
- Specifies the enum ID of RESTwithUS provider.Enum "Entity ID RWU"
- Specifies the enum ID of RESTwithUS entity.DateTime
- Specifies the timestamp of last synchronized record, that should be saved in the entity.Text
- Specifies the description of RESTwithUS provider.Text
- Specifies the description of RESTwithUS entity.DateTime
- Specifies the timestamp of last synchronized record, that should be saved in the entity.DateTime
Timestamp of the last synchronized record in Business Central for the selected entity.
//Get the timestamp of last customer record, that was synchronized to an external system
APIScriptRWU.TIMESTAMP(ProviderID::TestProvider,EntityID::TestProvider_Customer); //By enum ID
APIScriptRWU.TIMESTAMP('Test Provider','Customer'); //By description
//Save the timestamp of synchronized customer record to RESTwithUS entity
APIScriptRWU.TIMESTAMP(ProviderID::TestProvider,EntityID::TestProvider_Customer,Customer.SystemModifiedAt); //By enum ID
APIScriptRWU.TIMESTAMP('Test Provider','Customer',Customer.SystemModifiedAt); //By description