/// <summary> /// Synchronizes the email templates from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { AddComponentsToSolution(context, EntityName.template, SolutionPackageType.Entity, ComponentType.EmailTemplate); }
/// <summary> /// Synchronizes the plugins from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { AddComponentsToSolution( context, EntityName.pluginassembly, SolutionPackageType.Plugins, ComponentType.PluginAssembly ); }
/// <summary> /// Synchronizes the webresources from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { AddComponentsToSolution ( context, EntityName.webresource, SolutionPackageType.Webresources, ComponentType.WebResource ); }
/// <summary> /// Synchronizes the security roles from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { AddComponentsToSolution ( context, EntityName.role, SolutionPackageType.SecurityRoles, ComponentType.Role ); }
/// <summary> /// Synchronizes the reports from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { AddComponentsToSolution ( context, EntityName.report, SolutionPackageType.Report, ComponentType.Report ); }
/// <summary> /// Synchronizes the plugin steps from source to destination. /// </summary> /// <param name="context">The context.</param> public override void ExecuteProcess(XrmActivityContext context) { var sourcePlugins = XrmHelperFunctions.GetPluginsSteps(context.Source).Entities.ToDictionary(c => c.Id); var destinationPlugins = XrmHelperFunctions.GetPluginsSteps(context.Destination).Entities.ToDictionary(c => c.Id); AddComponentsToSolution ( context, sourcePlugins, destinationPlugins, SolutionPackageType.Plugins, ComponentType.SdkMessageProcessingStep ); }
public void ExtractEntities(XrmActivityContext context) { var destinationService = context.XrmServices[Destination]; var sourceService = context.XrmServices[Source]; var sourceEntitities = XrmMetadataHelperFunctions.GetAllEntityMetadataDictionary(sourceService, EntityFilters.Attributes); var destinationEntities = XrmMetadataHelperFunctions.GetAllEntityMetadataDictionary(destinationService, EntityFilters.Attributes); XrmMetadataHelperFunctions.ProcessTask(sourceEntitities, () => new XrmConnectionManager().GetConnection(context.Configuration.DataSources[Destination]), sourceEntity => { if (sourceEntity.IsCustomEntity != null && !sourceEntity.IsCustomEntity.Value) return; if (sourceEntity.IsIntersect != null && sourceEntity.IsIntersect.Value) return; if (sourceEntity.MetadataId != null && XrmHelperFunctions.IsExcemptedFromProcessing(sourceEntity.LogicalName, sourceEntity.MetadataId.Value, context.Configuration.Exceptions)) return; "create entity {0}".Trace(sourceEntity.LogicalName); var destinationEntity = destinationEntities.ContainsKey(sourceEntity.LogicalName) ? destinationEntities[sourceEntity.LogicalName] : null; if (destinationEntity != null) return; var request = new CreateEntityRequest() { Entity = sourceEntity, PrimaryAttribute = (StringAttributeMetadata) sourceEntity.Attributes.FirstOrDefault(c => c.IsPrimaryName != null && c.IsPrimaryName.Value) }; destinationService.Execute(request); }, null, context.Configuration.Threads); }