Skip to main content
Version: V3 (Ignition 8.3)

system.mes.personnel.deletePerson

Description​

Deletes a Person by their ID or username. This cannot delete a person with references to them.

Permissions​

This method requires the PERSONNEL.WRITE.DELETE permission.

Syntax​

system.mes.personnel.deletePerson(idOrUsername)

Parameters​

ParameterTypeNullableDescription
idOrUsernameStringFalseThe ID or username of the person to delete.

Returns​

If successful, an ApiResponse object is returned with the success bool set to true. If unsuccessful, an exception is thrown or an ApiResponse object is returned with details about the encountered error.

NameTypeDescription
successBooleanIndicates if the delete was successful.
messageStringThe reason why the deletion was successful or unsuccessful.
dataStringThe data associated with the deletion.
errorStringThe errors associated with the deletion.

Code Examples​

# Delete a person by ID
system.mes.personnel.deletePerson('01JAP8RJBN-8ZTPXSGY-J9GSDPE1')