ExportSolutionRequest ExportSolutionRequest ExportSolutionRequest ExportSolutionRequest Class

Definition

Contains the data that’s needed to export a solution.

For the Web API use the ExportSolution Action.

public ref class ExportSolutionRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
[System.Runtime.Serialization.DataContract(Namespace="http://schemas.microsoft.com/crm/2011/Contracts")]
public sealed class ExportSolutionRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type ExportSolutionRequest = class
    inherit OrganizationRequest
Public NotInheritable Class ExportSolutionRequest
Inherits OrganizationRequest
Inheritance
ExportSolutionRequestExportSolutionRequestExportSolutionRequestExportSolutionRequest
Attributes

Examples


 // Export or package a solution
//Export an a solution

     var exportSolutionRequest = new ExportSolutionRequest();
         exportSolutionRequest.Managed = false;
         exportSolutionRequest.SolutionName = solution.UniqueName;
     
     var exportSolutionResponse = (ExportSolutionResponse)svc.Execute(exportSolutionRequest);
     byte[] exportXml = exportSolutionResponse.ExportSolutionFile;
     string filename = solution.UniqueName + ".zip";
     File.WriteAllBytes(outputDir + filename, exportXml);
     Console.WriteLine("Solution exported to {0}.", outputDir + filename);

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.

solutions#WorkWithSolutions7 solutionsVB#WorkWithSolutions7

Remarks

Message Availability

For this message to work, the caller must be connected to the server.

Usage

Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of ExportSolutionResponse.

Privileges and Access Rights

To perform this action, the caller must have privileges listed in ExportSolution message privileges.

Notes for Callers

The properties of this request correspond to the options in the export solution dialog box in the application. The following table describes the settings included with each of the Export* settings.

Member

Setting

Display Name

Description

Constructors

ExportSolutionRequest() ExportSolutionRequest() ExportSolutionRequest() ExportSolutionRequest()

Initializes a new instance of the ExportSolutionRequest class

Properties

ExportAutoNumberingSettings ExportAutoNumberingSettings ExportAutoNumberingSettings ExportAutoNumberingSettings

Gets or sets whether auto numbering settings should be included in the solution being exported. Optional.

ExportCalendarSettings ExportCalendarSettings ExportCalendarSettings ExportCalendarSettings

Gets or sets whether calendar settings should be included in the solution being exported. Optional.

ExportCustomizationSettings ExportCustomizationSettings ExportCustomizationSettings ExportCustomizationSettings

Gets or sets whether customization settings should be included in the solution being exported. Optional.

ExportEmailTrackingSettings ExportEmailTrackingSettings ExportEmailTrackingSettings ExportEmailTrackingSettings

Gets or sets whether email tracking settings should be included in the solution being exported. Optional.

ExportExternalApplications ExportExternalApplications ExportExternalApplications ExportExternalApplications

ExportGeneralSettings ExportGeneralSettings ExportGeneralSettings ExportGeneralSettings

Gets or sets whether general settings should be included in the solution being exported. Optional.

ExportIsvConfig ExportIsvConfig ExportIsvConfig ExportIsvConfig

Gets or sets whether ISV.Config settings should be included in the solution being exported. Optional.

ExportMarketingSettings ExportMarketingSettings ExportMarketingSettings ExportMarketingSettings

Gets or sets whether marketing settings should be included in the solution being exported. Optional.

ExportOutlookSynchronizationSettings ExportOutlookSynchronizationSettings ExportOutlookSynchronizationSettings ExportOutlookSynchronizationSettings

Gets or sets whether outlook synchronization settings should be included in the solution being exported. Optional.

ExportRelationshipRoles ExportRelationshipRoles ExportRelationshipRoles ExportRelationshipRoles

Gets or sets whether relationship role settings should be included in the solution being exported. Optional.

ExportSales ExportSales ExportSales ExportSales

Gets or sets whether sales settings should be included in the solution being exported. Optional.

ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Managed Managed Managed Managed

Gets or sets whether the solution should be exported as a managed solution. Required.

Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
SolutionName SolutionName SolutionName SolutionName

Gets or sets the unique name of the solution to be exported. Required.

TargetVersion TargetVersion TargetVersion TargetVersion

Get or set a value indicating the version that the exported solution will support.

Applies to