SetDateField

Sets a custom incident field with current date.

python · Common Scripts

Source

from time import strftime

import demistomock as demisto  # noqa: F401
from CommonServerPython import *  # noqa: F401


def main():
    field_name = demisto.args()["fieldName"]

    t = strftime("%a, %d %b %Y %H:%M:%S %Z")
    res = demisto.executeCommand("setIncident", {field_name: t})
    demisto.results(res)


if __name__ in ("__main__", "__builtin__", "builtins"):
    main()

README

Sets a custom incident field with the current date.

Script Data


Name Description
Script Type python
Tags Utility

Inputs


Argument Name Description
fieldName The name of the incident custom field.

Outputs


There are no outputs for this script.