_create

Create an Asset Maintence.

Parameters

asset_id

Asset ID number.

jobref

Job reference number.

form_id

The form ID for the form used in the mainentance job.

next_date

What date should the maintenance start.

expiry_date

What date should the maintenance be completed by the latest.

recur_amt

Number of days, weeks, months or years the mainentance should reoccur.

recur_period

'3' - Days, '4' - Weeks, '5' Months, '6' - Years

default_user

ID of the user assigned to complete the mainentance job.

name

Textual description of the maintenance.

Example

FM_api('AssetMaintenance_create', array('asset_id' => '3', 'jobref' => '24', 'form_id' => '22', 'next_date' => '2018-10-01 14:32', 'expiry_date' => '2018-10-31', 'recur_amt' => '10', 'recur_period' => '3', 'default_user' => '0', 'name' => 'Service'));

Result

{"ok":1,"rec":{"id":"9","name":"Service","ids":"","cdate":"2018-10-01","edate":"2018-10-31","active":"0","every":null,"on_arr":null,"customer_id":"0","customer_type":"0","next_date":null,"user_id":"0","notes":null,"files":null,"edited_uuid":"AppointmentRecurrence_create","last_edited":"2018-10-01 14:41:54","days_in_advance":"30","copy_user":null,"copy_cust_ref":null}}

Last updated