web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Sandbox Framework functionality

(0) ShareShare
ReportReport
Posted on by 678

Hi All,

When we say something about the Sandbox framework from D365 FinOps developer's perspective, does this have something to do with SysOperationSandBox or completely something else?

When do we need to use this framework and please provide me with any sample code or any open source which implements this framework. 

Thank you. 

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,109 Super User 2025 Season 2 on at

    Hi ShawnDEV,

    I have not heard of a 'Sandbox framework', but I'm aware of the SysOperationSandbox. This class has replaced the RunBaseBatch classes which were available in AX2012.

    You can read about this class on the next blog: devblog.sertanyaman.com/.../

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi ShawnDev,

    I would say SysOperationSandBox is a part of "Sandbox framework" (it's mentioned only in Dev exam, but there is no other documentation on it).

    SysOperationSandBox allows you to run long processing in a separate session in async mode and shows the waiting form for async process (UI us not locked). Also, it provides "Cancel" button for this kind of process.

    You can use it:

    1. Directly from code - let's assume you need to run some long-running process and you already have a static method for it or you are planning to write it, but you don't want to create runBaseBatch or SysOperation class for operation. In this case, you can utilize SysOperationSandBox if you don't want to leave the user with a "freezed" UI.

    2. You can use it in RunBase and SysOperation by returning true in method canRunInNewSession (note that for RunBase you need to use runOperation method instead of run in main method, but there is already BP practice warning in place). You should also take into account that in this case, you need to implement pack\unpack design pattern, as the async session will be created based on packed variables.

  • ShawnDEV Profile Picture
    678 on at

    Hi,

    When we implement SysOperationSandbox framework class, it is indeed showing the progress bar to show the progress to the user. However, a user is not allowed to do other actions as the UI is frozen until the operation is finished. Is this because this operation is running synchronously so that other actions are not allowed to perform?

    Thank you  

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi ShawnDev,

    From the user perspective, UI as still blocked, but the user can cancel the request.

    From a server perspective, new async process is created to avoid blocking of UI process.

  • ShawnDEV Profile Picture
    678 on at

    Hi Sergei,

    I actually meant other operations like opening other forms, creating a record while running the operation having SysOperationSandBox framework. I somehow understand the concept of Async process in that it excutes a task in the background without the user having to wait until the operation is finished. But apparently users have to wait if they want to perform other operations. Could you correct my thought?

    Thank you.

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi ShawnDev,

    If you use SysOperationSandbox users need to wait until the operation will be finished.

    If you want to run async process (as real async), you need to check ReliableAsynchronous option for SysOperation framework or runAsync method.

  • Suggested answer
    Joris dG Profile Picture
    17,775 on at

    In general it's considered best practice to submit long running processes to the batch.

    If a user runs the job "interactively" there is a timeout on the client(browser scripts) where it calls the server process and waits for a completion/response. This will time out. Sandboxing is meant to keep that connection alive while the user waits for completion, without the browser/request timing out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans