This method allows operating with deleted records, for example, restoring them by script.

restore(deletedRecordId)


This method restores a deleted record.

Parameter(s):

NameTypeMandatoryDefault Value
deletedRecordIdStringYN


Return:

TypeDescription
BooleanThis method returns 'true' if a record has been restored successfully; otherwise, it returns 'false'.


Example:

const deletionLog = new SimpleRecordDeletionLog();
if (deletionLog.restore(current.sys_id)) {
  ss.addSuccessMessage('The record is restored')
}