Drafts Script Reference
    Preparing search index...

    Class ActionLog

    ActionLog objects represent entries in the action log. ActionLog objects are accessed using the actionLogs property of the Draft object.

    // loop over log entries, deleting any more than 100 days old
    for(let log of draft.actionLogs) {
    if (log.executedAt < Date.today.addDays(-100)) {
    log.delete()
    }
    }
    Index

    Content

    executedAt: Date

    Timestamp for the creation of the log entry

    executedDevice: string

    Which device the action was performed on, typically 'iPhone', 'iPad', or 'Mac'

    executedLatitude: number

    The latitude portion of the location recorded when action was executed, if location services are enabled.

    executedLongitude: number

    The longitude portion of the location recorded when action was executed, if location services are enabled.

    log: string

    The content of the log

    status: "pending" | "in-progress" | "completed" | "failed" | "cancelled"

    Status of the log. "failed" indicates the action ended in an error, "completed" indicates successful completion of the action.

    Identification

    action?: Action

    The Action object related to the log. This value may be undefined if the action no longer exists.

    draft?: Draft

    The Draft object related to the log. This value may be undefined if the action was performed without a draft in context, or if the related draft no longer exists.

    uuid: string

    Unique identifier

    Other

    • Delete the action log. This is permanent and should be used with caution

      Returns any

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.