Skip to main content

Entering Reason for Event on the Synergy Flow Side

This documentation explains how you can get this value when a reason needs to be entered for an event on the Synergy Flow side.

Getting a Reason for the Event

If you want to enter a reason for an event, you can get this value in the 'OnAfterEvent' or 'OnBeforeEvent' of the corresponding approver object as follows:

'''csharp string reason = args. Reason["en-TR"];


### Steps

1. **Using OnAfterEvent or OnBeforeEvent:**

In the 'OnAfterEvent' or 'OnBeforeEvent' method of the corresponding approver object, you can use the following code to get the reason value:

'''csharp
public void Position1_OnAfterEvent(object sender, OnBeforeEventArguments args)
{
string reason = args. Reason["en-TR"];
Other actions
}
```

or

'''csharp
public void Position1_OnBeforeEvent(object sender, OnBeforeEventArguments args)
{
string reason = args. Reason["en-TR"];
Other actions
}
```

## Conclusion

With this method, you can easily get the reason value entered for an event on the Synergy Flow side.