You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you ever run into the situation during the import or export of a large solution where the operation times out? If so, you may be a candidate for performing the solution import/export asynchronously. This topic describes how to initiate the asynchronous import or export using the SDK and Web APIs.
25
25
26
-
## Solution import
26
+
## Staging a solution
27
+
28
+
In comparison to importing a solution where the solution is imported and available in the environment right away, staging breaks the import process into more controllable phases. The staging process imports the solution as a "holding" solution where the administrator can decide when to make the staged solution available to users, or to perform an upgrade (in the case of a solution upgrade) in the target environment. Part of the staging process is validation of the staged solution. In this way you can stage the solution, know that the solution is valid, and schedule when to apply that solution or upgrade to the target environment.
27
29
28
-
`ImportSolution` is the action (or message) that performs the synchronous import operation. To execute the import operation asynchronously use `ImportSolutionAsync`.
29
30
30
31
| Operation | Web API | SDK API |
31
32
| --- | --- | --- |
32
-
|Import a solution |[ImportSolutionAsync](/dynamics365/customer-engagement/web-api/importsolutionasync)|[ImportSolutionAsyncRequest](/dotnet/api/microsoft.crm.sdk.messages.importsolutionasyncrequest)|
33
+
|Stage a solution |[StageSolution](/dynamics365/customer-engagement/web-api/stagesolution)|use the generic [OrganizationRequest](/dotnet/api/microsoft.xrm.sdk.organizationrequest) and set the **RequestName** property to "StageSolution"|
33
34
34
-
Now let's take a look at some example code that demonstrates `ImportSolutionAsync`.
35
+
The result of staging the solution will be a collection of validation results indicating success or failure and (if successful) a `StageSolutionUploadId` to be used in the `ImportSolutionAsync` call. See the import solution Web API sample code above for an example of how this is done.
// Demonstrating using a generic request and naming it. You could just use
73
-
// the ImportSolutionAsyncRequest class.
74
-
varr=newOrganizationRequest();
75
-
r.RequestName="ImportSolutionAsync";
76
-
r["SolutionParameters"] =newSolutionParameters();
77
-
r["OverwriteUnmanagedCustomizations"] =false;
78
-
r["PublishWorkflows"] =true;
79
-
r["CustomizationFile"] =fileBytes;
80
-
r["ComponentParameters"] =param;
81
-
82
-
varresponse=proxy.Execute(r);
83
-
}
84
-
```
51
+
`ImportSolution` is the action (or message) that performs the synchronous import operation. To execute the import operation asynchronously use `ImportSolutionAsync`.
52
+
53
+
| Operation | Web API | SDK API |
54
+
| --- | --- | --- |
55
+
| Import a solution |[ImportSolutionAsync](/dynamics365/customer-engagement/web-api/importsolutionasync)|[ImportSolutionAsyncRequest](/dotnet/api/microsoft.crm.sdk.messages.importsolutionasyncrequest)|
56
+
57
+
Now let's take a look at some example code that demonstrates `ImportSolutionAsync`.
0 commit comments