# Exercise: Entity & Entity triggers

## Requirements

Define two triggers for the entity “UserName\_Acc\_customers” (click here to see entity creation steps):&#x20;

* After Create Trigger: This trigger is initiated when a record is created in the entity. If the value in the entity field Join\_Date is present, Actions will be initiated to update the value of the field DayMonthJoinDate in coherence with the values of day and month in the Join\_Date value.
* After Update Trigger: This trigger is initiated when a record is updated in the entity. If the value in the Join\_Date or DayMonthJoinDate has been modified after the update, Actions will be initiated to update the DayMonthJoinDate value to be the same as the Join\_Date value.

## Solution

The solution is implemented in two steps:&#x20;

* Step 1: Define the “After Create” Trigger to update the value in DayMonthJoinDate according to Join\_Date when a record is created.&#x20;
* Step 2: Define the “After Update” Trigger to update the value in DayMonthJoinDate according to the updated value in Join\_Date.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.langstack.com/welcome/get-started/learn-langstack/using-triggers/exercise-entity-and-entity-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
