public void Execute(IServiceProvider serviceProvider) { try { ServerConnection cnx = new ServerConnection(serviceProvider); CrmRepository crm = new CrmRepository(cnx); ValidaContexto(cnx); foreach (EntityReference created in (IEnumerable <Object>)cnx.context.OutputParameters["CreatedEntities"]) { if (created.LogicalName == "account") { Entity account = crm.GetAccount(created.Id); } } } catch (Exception e) { throw new InvalidPluginExecutionException("QualifyLeadOutputP.ObtenerRegistros: " + e.Message); } }