AddSolutionComponent Action

Adds a solution component to an unmanaged solution.

Example

The following example adds a table to an unmanaged solution by using the AddSolutionComponent action.

Request

POST [Organization Uri]/api/data/v9.2/AddSolutionComponent
OData-MaxVersion: 4.0
OData-Version: 4.0
Accept: application/json
Content-Type: application/json; charset=utf-8

{
  "ComponentId": "00000000-0000-0000-0000-000000000000",
  "ComponentType": 1,
  "SolutionUniqueName": "examplesolution",
  "AddRequiredComponents": false,
  "DoNotIncludeSubcomponents": true
}

The ComponentId value is the ID of the solution component to add. For a table component, use the table metadata ID. The ComponentType value must match the type of solution component being added.

Note

You can only use this method when the solution component already exists. A better option is to associate the solution component to a solution using the MSCRM.SolutionUniqueName optional parameter when you create or update the solution component. Associate a solution component with a solution

Parameters

Parameters allow for data to be passed to the action.

Name Type Nullable Unicode Description
ComponentId
Edm.Guid False True

ID of the solution component.

ComponentType
Edm.Int32 False True

The solution component to add to the unmanaged solution.

SolutionUniqueName
Edm.String False False

Unique name of the solution.

AddRequiredComponents
Edm.Boolean False True

Indicates whether other solution components that are required by the solution component should also be added to the unmanaged solution.

DoNotIncludeSubcomponents
Edm.Boolean True True

Indicates whether the subcomponents should be included.

IncludedComponentSettingsValues
Collection( Edm.String ) False False

Any settings to be included with the component.

Return type

Type Nullable Description
AddSolutionComponentResponse False Contains the response of the AddSolutionComponent action.

Entities

Use the AddSolutionComponent action with these entity types:

Name Display name Description
solutioncomponent Solution Component A component of a CRM solution.

See also