Mostrando entradas con la etiqueta Alertas Sharepoint. Mostrar todas las entradas
Mostrando entradas con la etiqueta Alertas Sharepoint. Mostrar todas las entradas

sábado, 22 de septiembre de 2012

Tips/Info #71 Sharepoint 2010

1-Validación del lado del cliente para un form

El botón submit tiene un evento onclick:

if (!PreSaveItem()_) return false;WebForm_DoPostBackWithOptions(new ...

La función PreSaveItem invoca la función PreSaveAction que puedes sobrescribir con tu propia definición.Si PreSaveAction retorna true, entonces el form procede a guardar la información, de otra manera, se detiene con una alerta.

Con Sharepoint Designer 2010, abre la página en modo avanzado y agrega lo siguiente:

<script type="text/javascript" src="/Scripts/jquery.min.js"></script>
<!—sobrescribo PreSaveAction -->
<script type="text/javascript">
function PreSaveAction(){
   var field_to_validate = $("select[title='titulo del campo']").val();
   if(field_to_validate == ""){
     alert("Alerta: complete el campo");
     return false;
   }
   return true;
}
</script>

2-Cambiar el app pool de un web application

Nunca se debe cambiar el app pool desde el IIS, sino que se debe hacer mediante powershell, de esta manera consolida los datos entre las distintas granjas.

$webService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$pool = $webService.ApplicationPools["SharePoint - AppPoolWebApplication80"]
$app = Get-SPWebApplication  http://WebApplication_url
$app.ApplicationPool = $pool
$app.Update()
$app.ProvisionGlobally()

La propiedad ProvisionGlobally permite hacer los cambios tanto en IIS como en la configuración de Sharepoint. Sin esta propiedad, sólo se cambiará en la base de datos de configuración de Sharepoint, y no en IIS.

3-El botón de “Alert Me” no está visible

image_thumb

Esto se debe a que no tiene configurado un servidor de smtp para la granja.

Para configurarlo vaya a la Central administration edite la categoría Settings dentro de la sección System Settings

image_thumb1

image_thumb2

4-Error en Sharepoint Designer: “Your server may be of higher version than the currently installed SharePoint Designer”

Esto se debe a que un servidor de la granja necesita un upgrade. Para solucionarlo, ejecute el configuration wizard  y a su finalización, realice un iisreset.

5-Sharepoint Draft Folder

image004

Para configurar el draft local se debe realizar lo siguiente:

  • Abrir Microsoft Word 2007 o 2010
  • Ir a las opciones de  Word (Office Button > Word Options)
  • En la sección “Save”, cambia la opción “Save checked-out files to”a “The web server” (Office 2007) o “The Office Document Cache” (Office 2010)

image

Esta configuración también se puede realizar vía una GPO (Group Policy)

  • En Office 2007:
    Key: [HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Options]
    Registry Value Name: Local
    Registry Value: 0 (DWORD)
  • En Office 2010:
    Category: Microsoft Office Document Cache
    Policy: Check-out to local disk
    Associated Registry Key: [software\policies\microsoft\office\common\offline\options]
    Registry Value Name: UseLocalDrafts
    Registry Value: 0

Al finalizar, recuerde realizar un a logoff or gpupdate.

viernes, 6 de julio de 2012

Tips/Info #43 Sharepoint

1-Error: "The web server process that was being debugged has been terminated by Internet Information Services(IIS).  This can be avoided by configuring Application Pool ping settings in IIS."

iisdebugtimeout

Ir al app pool que deseamos deployar, y hacemos click derecho sobre el mismo  y elegimos Advanced Settings. A continuación cambiamos “Ping Enabled” a False o Ping Maximun response time a un valor mayor que 90

iisapppooladvancedsettings

2-Content Database Default al crear un site collection

Para cambiar la content database default donde se creará los próximos site collections, deberemos cambiar la propiedad el campo “Maximum number of sites that can be created in this database” al número actual de site para cada base de contenido del web application deseado excepto para la content database que quiere dejar como default.

Maximum-Sites

Con esta modificación un nueva collection será creado en la content database WSS_Content_2

Content-Database-Info

3-Habilitar finger scroller para Sharepoint para IPhone o IPad

#s4-workspace { -webkit-overflow-scrolling: touch; }

4-Borrar todoas las alertas de un site mediante PowerShell

$cantidadSites = 0
$cantidadBorradas = 0;

$sp = Get-SPWebApplication ("http://siteCollection/)
foreach ($site in $sp.Sites)
{
    foreach ($web in $site.AllWebs)
    {
        $cantidadSites++;        
        $alertIds = @();
        foreach ($alert in $web.Alerts)
        {
            $alertIds += $alert.ID;
            $cantidadBorradas++;   
        }        
        foreach ($alertId in $alertIds)
        {
            try
            {
                $web.Alerts.Delete($alertId);
            }
            catch [system.exception]
            {            
                # La excepción puede ser porque el usuario no existe (Ej: se cambio de dominio)
                # Actualizamos la alerta para que apunte a un usuario valido
                # Después la borramos
                if ($_.Exception.Message.Equals("El usuario no puede encontrarse"))
                {
                    $alertaParaActualizar = $web.Alerts[$alertId];
                    $alertaParaActualizar.User = $web.SiteUsers[0]; //le asigno el primer usuario disponible
                    $alertaParaActualizar.Update();
                   
                    #se trata de borrar de nuevo, pero esta vez con un usuario valido
                    $web.Alerts.Delete($alertId);                    
                }
            }
        }
    }
}

Write-Host "Número de Webs verificadas: " + $cantidadSites;
Write-Host "Número de alertas borradas: " + $cantidadBorradas;

Si deseamos borrar todas las alertas de un usuario específico, deberiamos cambiar la siguiente línea

foreach ($alert in $web.Alerts)
{
$alertIds += $alert.ID;
$cantidadBorradas++;
}

con la siguiente

foreach ($alert in $web.Alerts)
{
    if ($alert.User.LoginName –eq “nombre usuario”)
    {
        $alertIds += $alert.ID;

        $cantidadBorradas++;

    }
}

5-Dos errores que aparecen cuando no tenés configurado de forma correcta los AAM (Alternate Access Mapping)

  • Las alertas o envio de mails de SharePoint Designer Workflow con links a documentos o item muestran la URL interna u otra URL de los AAM´s antes que la URL pública
  • Loa resultados del search no muestran ningún resultado cuando busca sobre un scope específico 
    • Ej: En un subsite, you enter a search criteria which is scoped to "This site" and receive no results even though the content has been indexed.  "All Sites" scope works correctly regardless

martes, 3 de julio de 2012

Links útiles #41 Sharepoint

1-Timer Jobs

http://www.codeproject.com/Articles/403323/SharePoint-2010-Create-Custom-Timer-Jobs

http://adicodes.com/timer-job-in-sharepoint-for-specific-site/

2-Feature: activación de dependencias

http://karinebosch.wordpress.com/2011/03/12/feature-activation-dependencies-in-visual-studio-2010/

3-ECMA ejemplos

http://adicodes.com/javascript-object-model-in-sharepoint-2010/

4-Actions Ribbon Sharepoint 2010

http://sharepointwings.blogspot.com.ar/2012/06/sharepoint-2010-ribbon-button.html

5-Enviar un mail con adjunto en un workflow de Sharepoint (actividad)

http://sharepointstuff.codeplex.com/releases/view/66258

6-Conectando un WCF service con Infopath

https://www.nothingbutsharepoint.com/sites/devwiki/articles/Pages/Connecting-a-WCF-Service-to-an-InfoPath-Form.aspx

7-Deployando Sharepoint en Azure Virtual Machines

http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/AZR327

8-Crear job en Sharepoint que escriba en Base de Datos

http://www.codeproject.com/Articles/403323/SharePoint-2010-Create-Custom-Timer-Jobs

9-Abrir PDF en el navegador en Office 365

http://sharepointontop.blogspot.com.ar/2012/06/office-365-open-pdf-files-in-browser.html

10-Habilitar & Deshabilitar alertas en Sharepoint 2010

http://code.msdn.microsoft.com/sharepoint/Enable-Disable-Alerts-for-cb765602

lunes, 26 de diciembre de 2011

Alertas Sharepoint 2010 – Custom template

SharePoint Foundation includes Pre-defined alert templates for e-mail and SMS messages
Pre-defined Alert Template Location: %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML
SharePoint Foundation includes Pre-defined alert templates for e-mail and SMS messages
Pre-defined Alert Template Location: %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML
Email Template: AlertTemplates.xml
SMS Template: AlertTemplates_SMS.xml
Template includes information such as the format, contents and properties for the alert email and SMS messages.


Customize alerts
(1) Create a copy of the xml template file that you need to change – AlertTemplates.xml and AlertTemplates_SMS.xml
(2) Modify the copy of the alert template file – (The original template file should not be modified)
You can make changes to the template such as add a button/link, include an image or privacy information, modify the look of the alert etc.
To customize the appearance of alerts, modify the css by using the Format element.
Resource variables listed within the template definition file, such as $Resources:Alerts_anything_filter_shortname, can be found in core.resx (in the local_drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources folder)
If you are modifying any element other than the Format element, both the email and the SMS templates should be modified, in parallel – the 2 templates should be in sync except for the Format element.
(3) Load the custom templates by using the command: stsadm -o updatealerttemplates. I haven’t found a direct equivalent Powershell command.
If both, the email and the SMS template are updated, the UpdateAlertTemplates command needs to be run twice, once for each of the two files.
(4) Restart IIS
(5) The SharePoint Timer service may need to be restarted.