# IntegrationEvent attribute
> Version: _Available or changed with runtime version 1.0._
Specifies that the method is published as an integration type event.
## Applies to
 Method
## Syntax
```al
[IntegrationEvent(IncludeSender: Boolean, GlobalVarAccess: Boolean [, Isolated: Boolean])]
```
### Arguments
IncludeSender
Type: ../methods-auto/boolean/boolean-data-type
Specifies whether global methods in the object that contains the event publisher method are exposed to event subscriber methods that subscribe to the event.
GlobalVarAccess
Type: ../methods-auto/boolean/boolean-data-type
Specifies whether global variables in the object that contains the event publisher method are accessible to event subscriber methods that subscribe to the published event.
*[Optional] Isolated*
Type: ../methods-auto/boolean/boolean-data-type
Specifies if event subscribers should be invoked in an isolated transaction.
## Snippet support
Typing the shortcut teventint will create the basic IntegrationEvent attribute syntax when using the AL Language extension for Microsoft Dynamics 365 Business Central in Visual Studio Code.
## Remarks
When you set IncludeSender to true, an event subscriber can declare a sender parameter that references the publishing object. You must add the parameter to the subscriber manually, as shown in the example.
> IMPORTANT
> Avoid GlobalVarAccess. Use event parameters instead, or mark page or table variables as protected. See ../devenv-protected-variables.
When you set GlobalVarAccess to true, an event subscriber can access global variables in the object that declares the publisher method. Add each variable to the subscriber signature manually. Its name and type must match the declaration in the publishing object, as shown in the example.
Learn more about the different event types in ../devenv-event-types.
Learn more about isolated events in ../devenv-events-isolated.
## Example
This example publishes an integration type event by using the OnAddressLineChangedEvent method. The method takes one Text parameter.
The IncludeSender and GlobalVarAccess arguments are set to true. The subscriber method SubscribeToOnAddressLineChangedEvent therefore includes:
 The sender parameter for event publishing codeunit MyPublishingCodeunit.
 A parameter for the global variable myGlobalVar defined in the publishing codeunit MyPublishingCodeunit.
```al
codeunit 50102 MyPublishingCodeunit
{
    [IntegrationEvent(true, true)]
    procedure OnAddressLineChangedEvent(Line: Text[100])
    begin
    end;

    var
        MyGlobalVar: Integer;
}

codeunit 50103 MySubscribingCodeunit
{
    [EventSubscriber(ObjectType::Codeunit, Codeunit::MyPublishingCodeunit, 'OnAddressLineChangedEvent', '', true, true)]
    local procedure SubscribeToOnAddressLineChangedEvent(Sender: Codeunit MyPublishingCodeunit; MyGlobalVar: Integer)
    begin
        // My subscriber code
    end;
}
```
## Related information
AL method reference<../methods-auto/library>
../devenv-events-in-al
../devenv-publishing-events
../devenv-raising-events
../devenv-subscribing-to-events
../devenv-events-isolated
devenv-method-attributes

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-integrationevent-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-integrationevent-attribute/
