public static bool UpdateDynamicEntity(ICrmService Service, DynamicEntity entityName){try{ // Create the update target. TargetUpdateDynamic updateDynamic = new TargetUpdateDynamic(); // Set the properties of the target. updateDynamic.Entity = entityName; // Create the update request object. UpdateRequest update = new UpdateRequest(); // Set request properties. update.Target = updateDynamic; // Execute the request. UpdateResponse updated = (UpdateResponse)Service.Execute(update); return true;}catch (System.Web.Services.Protocols.SoapException ex){ return false;}catch (Exception ex){ return false;}}
0 comments:
Post a Comment