Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
We wrote the static methods as private for a reason. We don't want to allow the code to be run out of our control. Should another developer try to use the Sandbox method, it could cause an error if the process was running in batch.
The other reason they are private is that we are using a container object to pass the variables. This is unsafe, as containers can contain virtually anything. We need to be sure that it contains our variables and in the correct order. This is the only way to use the Sandbox, so we need to be careful. Even if our method does not need any parameters, the callback method must have a container as a input parameter, which it will simply ignore.
We would normally place the code in this recipe in a separate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access