Nested WITHs
Categories:
Do not nest WITHs that reference different types of objects.
Bad code
WITH PostedWhseShptLine DO BEGIN
...
WITH ItemLedgEntry DO
InsertBufferRec(...,"Serial No.","Lot No.",...);
...
END;
Good code
WITH PostedWhseShptLine DO BEGIN
...
InsertBufferRec(...,ItemLedgEntry."Serial No.",ItemLedgEntry."Lot No.",...);
...
END;
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified August 11, 2025: Merge pull request #264 from microsoft/jeremy-siteops (f82dfd0)
by Jeremy Vyska