diff --git a/content/docs/agentic-coding/vibe-coding-rules/al-performance.md b/content/docs/agentic-coding/vibe-coding-rules/al-performance.md index 9e4aa7aa..5ef3eadc 100644 --- a/content/docs/agentic-coding/vibe-coding-rules/al-performance.md +++ b/content/docs/agentic-coding/vibe-coding-rules/al-performance.md @@ -74,10 +74,10 @@ Item.FindFirst(); ``` ```al -// Bad example (avoid SetLoadFields after filtering) -Item.SetLoadFields("Item Category Code"); +// Bad example - SetLoadFields should be called before database operations like `FindFirst` or `FindSet` Item.SetRange("Third Party Item Exists", false); Item.FindFirst(); +Item.SetLoadFields("Item Category Code"); ``` ## Rule 3: Use Temporary Tables, Dictionaries, and Lists for Performance