Exemplo n.º 1
0
 /// <summary>
 /// Method to retrieve the Secure Configuration Identifier.
 /// </summary>
 /// <param name="step">The XRM Step Object.</param>
 /// <param name="service">The XRM Service.</param>
 /// <param name="secureConfigurationId">The Secure Configuration Identifier.</param>
 /// <param name="sdkMessageProcessingStep">The Dynamics CRM Step Object.</param>
 /// <returns>The Secure Configuration Identifier.</returns>
 private Guid?GetSecureConfigId(PluginStep step, XrmService service, Guid?secureConfigurationId, SdkMessageProcessingStep sdkMessageProcessingStep)
 {
     try
     {
         if (!string.IsNullOrEmpty(step.SecureConfiguration))
         {
             if (sdkMessageProcessingStep.SdkMessageProcessingStepSecureConfigId != null)
             {
                 SecureConfigurationId = sdkMessageProcessingStep.SdkMessageProcessingStepSecureConfigId.Id;
             }
             else
             {
                 SecureConfigurationId = Guid.NewGuid();
             }
         }
         else
         {
             if (sdkMessageProcessingStep.SdkMessageProcessingStepSecureConfigId != null)
             {
                 service.Delete(SdkMessageProcessingStepSecureConfig.EntityLogicalName, sdkMessageProcessingStep.SdkMessageProcessingStepSecureConfigId.Id);
             }
         }
         secureConfigurationId = SecureConfigurationId;
         return(secureConfigurationId);
     }
     catch (FaultException <Microsoft.Xrm.Sdk.OrganizationServiceFault> )
     {
         throw;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Overloaded method to delete a solution from Dynamics CRM.
 /// </summary>
 /// <param name="solutionUniqueName">The unique name of the solution to delete from Dynamics CRM.</param>
 public void DeleteSolution(string solutionUniqueName)
 {
     try
     {
         using (XrmService service = new XrmService(XRMConnectionString))
         {
             service.Delete(Solution.EntityLogicalName, GetSolutionIdByUniqueName(solutionUniqueName));
         }
     }
     catch (FaultException <Microsoft.Xrm.Sdk.OrganizationServiceFault> )
     {
         throw;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Method to delete a solution from Dynamics CRM.
 /// </summary>
 /// <param name="solution">The solution object containing the details of the solution to delete.</param>
 public void DeleteSolution(Entity solution)
 {
     try
     {
         using (XrmService service = new XrmService(XRMConnectionString))
         {
             if (solution != null)
             {
                 service.Delete(Solution.EntityLogicalName, solution.Id);
             }
         }
     }
     catch (FaultException <Microsoft.Xrm.Sdk.OrganizationServiceFault> )
     {
         throw;
     }
 }