Breyta

Deila með


Transfer customizations between environments using solution export and import

Dynamics 365 is highly customizable. You can use its online tools to modify or create fields, entities, business processes, and more. Usually, you'll do your customization work on a sandbox environment, test them, and then transfer the final customizations to your production environments when they're ready. Best practices recommend that you proceed as follows:

  1. Create a copy of your current production environment onto a sandbox environment where you can work without affecting your ongoing operations.
  2. Create a new managed solution on the sandbox and implement your customizations there. This lets you add customizations without affecting the underlying system, and you can revert your customizations at any time by removing the solution.
  3. Test the customized solution on your sandbox until you've confirmed it's working correctly.
  4. Export the custom solution from your sandbox and then Import it on your production environment.

For general information about creating and working with solutions, see the links in the previous procedure and also the Solutions overview. For a full example procedure, see the following sections.

Example procedure part 1: Create a custom solution

In this exercise, you'll create a new solution and add a simple customization to it. This will provide a simple custom solution that you can use to export and and transfer to a new environment later in this topic. If you already have a custom solution to work with, then you can skip ahead to Part 2.

To create a custom solution:

  1. Sign in to the environment where you will develop your custom solution.

  2. Open the Settings menu The Settings menu icon. at the top of the page and select Advanced settings. The advanced-settings area then opens in a new browser tab. Note that this area uses a horizontal navigator at the top of the page instead of a side navigator.

  3. Navigate to Settings > Customization > Solutions. A list of existing solutions opens.

    The solutions list.

  4. Select New on the command bar to create a new solution.

  5. A new Power Apps window opens. Provide a Display name, Name, Publisher, and Version and then select Save on the command bar to save your solution.

    The new solution form.

  6. For this example, we're going to copy an existing entity and then customize it, so open the Add Existing drop-down list and select Entity.

    Add an existing entity.

  7. A dialog opens, showing all the available entities. Here you can add any number of entities to your new solution. For this example, just select the Marketing form check box and then select OK to add it to your solution.

    Select the Marketing form entity.

  8. You're now asked to choose which aspects of the selected entity you'd like to include. In this case, we want to include everything related to marketing forms, so select the Add all assets check box and then select Finish.

    Add all assets.

  9. If your selected entity requires additional components, then you'll be asked whether to include them. Select Yes, include required components and then select OK.

    Include required components.

  10. You now return to your new solution, which now includes all of the entities and related components that you selected to include. In side panel, expand Entities to see the entities you added, and then expand the Marketing form entity and select Fields.

    Select Fields.

  11. For this example, we'll customize the Marketing form entity by adding a new field. Select New to create a new field and enter a Display Name. Leave the other settings at the default values (we'll allow this to be a text field).

    Create a new field and enter a Display Name.

  12. When you're done making all the required settings, select Save and close on the command bar.

  13. You now return to the Power Apps window where you're setting up the new solution. Select Publish All Customizations to make your new field available to the app.

  14. In the side panel of the Power Apps window, go to Components > Entities > Marketing form > Forms. We need to add our new custom field to a form to make it visible to users in the app.

  15. Open the from named Information with a Form type of Main by selecting its name. This is the form that users see when they create or open a marketing-form record.

    The forms list.

  16. A new Power Apps window opens showing your selected form setup. In the central pane of this window, scroll down to the Summary section. Then drag your new custom field from the Field explorer panel to the General information section under the Summary.

    Add a field to the form.

  17. Select Save and close on the ribbon.

  18. You now return to the Power Apps window where you're setting up the new solution. Select Publish All Customizations to make your customized form available to the app.

  19. When publishing is complete, close the Power Apps window.

If you'd like to confirm your changes, you can go to the Customer Insights - Journeys app, open a marketing form record and look for your new field on the Summary tab.

Example procedure part 2: Export a solution

When you're done customizing your solution and ready to move it to another environment, the next thing you must do is export the custom solution. Here's how:

  1. If you're not already there after the last exercise, go to the advanced-settings area by opening the Settings menu The Settings menu icon. at the top of the page and then select Advanced settings.

  2. Navigate to Settings > Customizations > Solutions.

    The solutions list.

  3. Select the check box for the solution you want to export, and then select Export on the command bar.

  4. The system now reminds you that only published changes will be exported. If you followed the procedure in the previous section, then you should already have published everything, but if you're not sure, you can publish now. When you're ready to continue, select Next.

    Export-solution wizard, page 1.

  5. You can now choose to include various system settings in the export. System settings will be applied permanently on the destination environment, and will remain there even if you later remove the solution. Normally, you shouldn't include any system settings, and if you are just doing this procedure as an exercise, then don't select any of these check boxes now. Select Next to continue.

    Export-solution wizard, page 2.

  6. Select Managed and then select Export.

    Export-solution wizard, page 3.

  7. The solution now downloads as a zip file named after the solution name.

Example procedure part 3: Import a solution

After exporting the custom solution from the source environment, you're ready to import the solution to the destination environment, which will add it's customizations to that environment and also make it easy for you to remove them again if needed (though any imported system settings will remain if you chose to include them in your exported solution).

To import a solution:

  1. Sign in to the environment where you will import your custom solution.

  2. Open the Settings menu The Settings menu icon. at the top of the page and select Advanced settings. The advanced-settings area then opens in a new browser tab. Note that this area uses a horizontal navigator at the top of the page instead of a side navigator.

  3. Navigate to Settings > Customization > Solutions. A list of existing solutions opens.

    The solutions list.

  4. Select Import on the command bar. The import dialog launches.

    Import dialog, page 1.

  5. Select Choose file to open a file browser. Find and select the solution file that you exported from the source environment.

  6. Select Next to continue.

    Import dialog, page 2.

  7. Select Import to begin importing the selected solution. A progress bar opens in a pop-up window, which closes automatically when the import is done. Then the import dialog updates to show the result.

    Import dialog, page 3.

  8. Select Close to close the import dialog.

  9. To confirm the import, go to the Customer Insights - Journeys app, open a marketing form record and look for the new customized field on the Summary tab.