# Use case: Element selectors for Microsoft Dynamics

When configuring the **Adoption settings** for **Microsoft Dynamics** Adopt guide&#x73;**,** use the **Element selectors** on this page to:

* Maximize the stability and reliability of element selection by avoiding dynamic identifiers.
* Enhance guide resistance to webpage changes from Microsoft Dynamics.

### Element selectors for Microsoft Dynamics

From the **Adoption settings** tab > [Settings subtab](https://docs.nexthink.com/platform/user-guide/adopt/guide-creation-and-management-from-nexthink-applications/configuring-adoption-settings/..#configuring-adoption-settings-for-the-selected-application) in Nexthink, for the Microsoft Dynamics web application configured in Nexthink:

* **Ignored element IDs**: `form_.*`
* **Element ID replacement**: Instruct the system to remove dynamic components—in this case, numbers—from ID or class-name selectors, and only keep the static segments of interest.
  * In the *ID* field, enter `(.+)_\d+_(.+)` . This code represents any number within the element ID.
  * In the *Replacer* field, enter `[id^="$1"][id$="$2"]` . This code represents the element ID segments before and after the number within the ID.
  * See[ Element ID replacement example](#element-id-replacement-example) below.
* **Ignored element class names**: `.*(\d+).*` This code represents numbers within class names.
* **Included element custom attribute names**: `aria-label, data-automation-id, data-uxi-widget-type, data-uxi-element-id, role, name, title, aria-describedby, data-dyn-controlname, data-dyn-content, data-dyn-form-name, data-dyn-placeholder, data-dyn-role, data-dyn-title, aria-expanded, dyn-data-optional-label, alt, data-dyn-columnname, data-dyn-form-name, data-dyn-title, data-dyn-mappedtab, command, data-handler, placeholder`
* **Dropdown list selector**: Leave this field empty to ensure proper feature functionality.

<details>

<summary>Element ID replacement example</summary>

After defining the **Element ID replacement** fields as:

* *ID*: `(.+)_\d+_(.+)`
* *Replacer*: `[id^="$1"][id$="$2"]`

For the following element ID example:

`<span id="entassetrequesttableall_23_EntAssetRequestTableCreate_label">abc</span>`

1. The CSS element selector contains dynamic components—in this case, the number `23`:

```
span#entassetrequesttableall_23_EntAssetRequestTableCreate_label.button-label:nth-child(3)
```

2. The system modifies the CSS selector by incorporating only static elements, resulting in:

```
span.button-label[id^="entassetrequesttableall_"][id$="_EntAssetRequestTableCreate_label"]:nth-child(3)
```

* Where `[id^="entassetrequesttableall_"]` means the element ID starts with `entassetrequesttableall_`
* Where `[id$="_EntAssetRequestTableCreate_label"]` means the element ID ends with `_EntAssetRequestTableCreate_label`

</details>

{% hint style="warning" %}
Use Nexthink default configurations for the remaining **Adoption settings**, including **Guide defaults**.

Your configuration should look like the image below.
{% endhint %}

<figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-0302d960159cd9ae2ab4b2d7dd1a6463804e5f68%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
