<turbo-stream action="update" target="wiki_card"><template>

<h1>Indexed Fields in Dynamics ERPs</h1>
<div class="trix-content"><p>When integrations read data from Microsoft Dynamics ERPs (NAV, Business Central, or Finance &amp; Operations), performance depends heavily on whether the fields used in <strong>filters or sort orders</strong> are <strong>indexed</strong> in the source table.<br> An index acts like a shortcut that allows the system to locate records quickly without scanning the entire table.</p><p>If a field (for example, <code>SystemModifiedAt</code>, <code>Last Date Modified</code>, or <code>Posting Date</code>) is <strong>not part of a key/index</strong>, the ERP must perform a <strong>full table scan</strong> every time the integration runs a filtered or sorted query. This causes slow responses, timeouts (e.g. 408 or 504 errors), or high load on the ERP service.<br><br><strong>For OData / API Pages</strong></p><ul><li>The field must be:<ul><li>Present on the page.</li><li>Bound directly to the table field (<code>Rec.SystemModifiedAt</code>).</li><li>Included in a key for efficient ordering.</li></ul></li></ul><p>This matters because most integrations use datetime fields for delta logic. Without an index, these operations trigger full scans and degrade performance as data grows.<br>&nbsp;With a proper index, the ERP uses <strong>seek operations</strong>, resulting in faster, predictable reads and stable sync cycles.<br><br><strong>Best Practice</strong></p><p>Always ensure:</p><ul><li>The <strong>delta or sort field</strong> is indexed and part of a key.</li><li><strong>Composite keys</strong> (e.g. <code>Company</code>, <code>SystemModifiedAt</code>) are used for multi-company setups.</li><li>The field used for <code>$orderby</code> or filtering is <strong>bound directly</strong> to a real table column.</li></ul></div>
</template></turbo-stream>

