Audit.SetEnabled
----------------

Turns audit globally on or off.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Audit](component_Audit.md) | [7.1](newinversion71.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Audit.SetEnabled"; State ) 

**MBS**( **"Audit.SetEnabled";** /\* Turns audit globally on or off. \*/  
**$State**) /\* The new state.  
Pass 1 to enable or 0 to disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| State | The new state.   Pass 1 to enable or 0 to disable. | 1 |

### Result

Returns OK or error.

### Description

Turns audit globally on or off.  
Default is enabled.  
You can turn off for batch imports.  
  
The [Audit.Changed](AuditChanged.md), [Audit.Changed2](AuditChanged2.md), [Audit.Delete](AuditDelete.md) and [Audit.Delete2](AuditDelete2.md) functions return 1 if disabled, so any boolean operation using the result still works.  
### Examples

Enable audit globally:

 MBS ( "Audit.SetEnabled"; 1 )  
Disable audit globally:

 MBS ( "Audit.SetEnabled"; 0 )  
### See also

- [Audit.Changed](AuditChanged.md)
- [Audit.Changed2](AuditChanged2.md)
- [Audit.Delete](AuditDelete.md)
- [Audit.Delete2](AuditDelete2.md)
- [Audit.GetEnabled](AuditGetEnabled.md)

### Release notes

- **Version 7.1**
    - Added [Audit.GetEnabled](http://www.mbsplugins.eu/AuditGetEnabled.shtml) and [Audit.SetEnabled](http://www.mbsplugins.eu/AuditSetEnabled.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 7.1pr1](https://www.mbsplugins.de/archive/2017-02-04/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 24th January 2017 , last changed 25th January 2017

  
[Audit.SetDateAndTimeAsNumbers](AuditSetDateAndTimeAsNumbers.md) - [Audit.SetIgnoreCalculations](AuditSetIgnoreCalculations.md)

[HTML Version](AuditSetEnabled.shtml)