_disable

Deletes an Asset Maintenance and any incomplete jobs associated with it.

Parameter

id

The ID of the Asset Maintenance you wish to disable

Example

FM_api('AssetMaintenance_disable',['id'=>'31012']);

Results

On Success

Returns the following: "m" => Data of the (now removed) Asset Maintenance "rec_id" => The ID of the associated Job Recurrence "r" => Data of the Job Recurrence "appidsr" => The IDs of all the Incomplete Jobs

{
    "m":{
        "id":"31014",
        "name":"Test Description",
        "next_date":"2023-08-09 12:42:00",
        "history":null,
        "asset_id":"466325",
        "cdate":"2023-08-09 11:42:38",
        "recurrence":"{
            \"amt\":2,
            \"period\":3
        }",
        "meta":null,
        "recurrence_id":"429090",
        "next_app_id":"477074",
        "last_date":null,
        "default_user":"0"
    },
    "rec_id":429090,
    "r":{
        "id":"429090",
        "name":"Asset Maintenance: Big",
        "ids":"477074,477077,477079,477080,477082,477084,477086,477088",
        "cdate":"2023-08-09",
        "edate":"2023-08-23",
        "active":"1",
        "every":"3",
        "on_arr":"2",
        "customer_id":"466325",
        "customer_type":"1",
        "next_date":null,
        "user_id":"0",
        "notes":null,
        "files":null,
        "edited_uuid":"AppointmentRecurrence_setupMonth",
        "last_edited":"2023-08-09 11:42:39",
        "days_in_advance":"700",
        "copy_user":null,
        "copy_cust_ref":null,
        "department_id":"0",
        "form_id":"0",
        "schedule":"[]",
        "meta":"{
            \"appointment_type\": \"0\",
            \"copy_job_value\": 1
            }",
        "custom":null,
        "copy_job_ref":null,
        "created_by":"0",
        "skip_weekends":"0"
    },
    "appidsr":[
        {
            "id":"477074"
        },
        {
            "id":"477077"
        },
        {
            "id":"477079"
        },
        {
            "id":"477080"
        },
        {
            "id":"477082"
        },
        {
            "id":"477084"
        },
        {
            "id":"477086"
        },
        {
            "id":"477088"
        }
    ]
}

On Failure

If the "id" parameter is not set, or has a value less than 1

{"error":"missing or invalid parameter: id"}

Last updated