# Notification.GetData(Text) Method
> Version: _Available or changed with runtime version 1.0._
Retrieves data that was passed to a notification instance as specified by a SETDATA method call.
## Syntax
```al
Value :=   Notification.GetData(Name: Text)
```
## Parameters
Notification
Type: notification-data-type
An instance of the notification-data-type data type.
Name
Type: ../text/text-data-type
The name of the data item that is specified by the SETDATA method call.
## Return Value
Value
Type: ../text/text-data-type
The data retrieved
## Remarks
You use the notification-setdata-method and GetData methods for transferring data in a notification. The methods are typically needed for handling actions on the notification. The notification-setdata-method method is called from the source of the notification, while the GetData method is called from the action code.
For more information and a detailed example, see ../../devenv-notifications-developing.
##  Example
The following code sets the data for a notification:
```al
MyNotification.Message := 'This is a notification';
MyNotification.Scope := NotificationScope::LocalScope;
MyNotification.SetData('Created',Format(CurrentDateTime,0,9));
MyNotification.SetData('ID',Format(CreateGUID,0,9));
MyNotification.AddAction('Action 1',CodeUnit::"Action Handler",'RunAction1');
MyNotification.AddAction('Action 2',CodeUnit::"Action Handler",'RunAction2');
MyNotification.Send;
```
The following code gets the data for a notification:
```al
MyNotification.GetData('Created');
MyNotification.GetData('ID');
```
## Related information
notification-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

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/methods-auto/notification/notification-getdata-method, 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/methods-auto/notification/notification-getdata-method/
