SEARCH THE COMMUNITY

Find an existing answer

4 results for “update_recordset”

CommunityHow do I update multiple records using `update_recordset` in X++?How do I update multiple records using update_recordset in X++?CommunityD365FO: When `update_recordset` bypasses field validation/audit, should I use buffer `.update()`/`.doUpdate()` or an explicit loop?In D365FO, I’m doing a set-based change using `update_recordset` to update a few fields on `MyTable` for performance. However, this seems to bypass expected behavior: fields like `ModifiedField`/`ModifiedBy`, custom `validateField` logic, table/field events, and database logging/CommunityWhy does `update_recordset` bypass table `validateWrite()` and `modifiedField()` logic in X++? How can I trigger it safely?When I run an X++ `update_recordset` against a table, I’m seeing that my table’s `validateWrite()` and `modifiedField()` (and any audit/side-effect logic tied to those) are not executed for the updated fields. For example: ```x++ MyTable myTable; update_recordset myTable sArticleX++ update_recordset vs update() vs doUpdate(): when each one is safe in D365FOA practical guide to choosing the right D365FO update pattern. Learn when set-based updates are appropriate, when table logic still runs, and why doUpdate is usually the wrong escape hatch.