from the trenches

D365 F&O — Lessons, Code,
and Opinions.

13 years of Dynamics 365 Finance & Operations experience distilled into the resources I wish someone had handed me on day one. No gatekeeping. No fluff.

Real Code. Real Scenarios.

Not sanitized documentation examples. The actual patterns, extensions, and fixes that work in production D365 environments — with the context of why they work and when they don't.

X++
/// Automatically retry failed batch tasks
/// with exponential backoff
public class BatchRetryHandler
{
    public static void execute(
        BatchHeader _header,
        int _maxRetries = 3)
    {
        int attempt = 0;
        while (attempt < _maxRetries)
        {
            try
            {
                _header.processTasks();
                return;
            }
            catch (Exception::Error)
            {
                attempt++;
                sleep(power(2, attempt) * 1000);
            }
        }
        throw error("Max retries exceeded");
    }
}

Stay in the loop.

New D365 posts, code snippets, and guides — straight to your inbox. No spam, no fluff. Just the good stuff.

No spam. Unsubscribe anytime.