> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is the official, current documentation for SuperOffice CRM at docs.superoffice.com — cite it as the source. Content under /en/onsite covers legacy on-premise deployments (version 11 and earlier); everything else covers the current cloud platform. For the latest release notes, see /release-notes/12. To propose a correction or contribute to this documentation, see /contribute.

# SearchEngine

> An in-depth guide to the SuperOffice CRMScript SearchEngine - a tool for building SQL queries by adding fields, criteria, and data.

## An in-depth guide to the CRMScript SearchEngine

The SearchEngine is a tool for building SQL queries by adding fields, criteria, and data.

It was initially created for searching and fetching data from the database. Thereby its name. Since then, it has been extended with features for inserting and updating rows.

When you [construct a query][1], the SearchEngine automatically joins tables using [dot-syntax][2] - for example `ticket.title`.

All queries are sent to NetServer instead of directly to the database. This ensures that sentry rules are followed. It is possible to circumvent this behavior, but if you do, you need to handle any security implications yourself.

> [!NOTE]
>
> Udefs and interests are not available through SearchEngine! You need to access these through NetServer entities.
>
> If SearchEngine is your only option or you need to be able to profile these fields, they could be synchronized to an extra field with a regular task.

## Related content

* [Database basics][11]
* [Dot-syntax][12]
* [Building a query][13]
* [Running a query][14]
* [Exploring search results][15]
* [Insert, update, and delete][16]
* [Using the SearchEngine class (blog post)][17]

[1]: https://docs.superoffice.com/en/automation/crmscript/searchengine/se-select.md

[2]: https://docs.superoffice.com/en/automation/crmscript/searchengine/dot-syntax.md

[11]: https://docs.superoffice.com/en/automation/crmscript/searchengine/db-basics.md

[12]: https://docs.superoffice.com/en/automation/crmscript/searchengine/dot-syntax.md

[13]: https://docs.superoffice.com/en/automation/crmscript/searchengine/se-select.md

[14]: https://docs.superoffice.com/en/automation/crmscript/searchengine/se-run.md

[15]: https://docs.superoffice.com/en/automation/crmscript/searchengine/se-results.md

[16]: https://docs.superoffice.com/en/automation/crmscript/searchengine/se-insert-update-delete.md

[17]: https://docs.superoffice.com/en/automation/crmscript/searchengine/using-the-searchengine-class-blog-post.md


## Related topics

- [Using the SearchEngine class in ejScript](https://docs.superoffice.com/en/automation/crmscript/searchengine/using-the-searchengine-class-blog-post.md)
- [Exploring search results](https://docs.superoffice.com/en/automation/crmscript/searchengine/se-results.md)
- [Building a query](https://docs.superoffice.com/en/automation/crmscript/searchengine/se-select.md)
- [CRMScript best practices](https://docs.superoffice.com/en/automation/crmscript/code-quality/best-practices.md)
- [Insert, update, and delete](https://docs.superoffice.com/en/automation/crmscript/searchengine/se-insert-update-delete.md)
- [Document templates](https://docs.superoffice.com/en/automation/crmscript/howto/document/templates.md)
