SharePoint 2010 : TimerJob et CSV

Toujours avec notre fichier CSV, nous avons vu comment passer côté PowerShell pour provisionner nos User Profile, mais comment les implémenter côté SharePoint?

 

TimerJob & EventReceiver

 

Une fois votre nouveau projet créé ajoutez une classe qui hérite de SPJobDefinition, et implémentez les méthodes associées. Le fichier CSV est stocké au niveau de la Centrale d’Administration dans les Documents partagés

Et c’est parti :

image

image

EventReceiver

Ajoutez un Event Receiver à votre Feature et mettez le code suivant. Notre Timer Job sera attaché au service des profils utilisateurs. Ne pas oublier de définir le Scope sur le mode Site dans la configuration de votre Feature.

image

Et Voilà votre TimerJob est prêt à traiter votre fichier CSV et à provisionner.

Comments

One response to “SharePoint 2010 : TimerJob et CSV”

  1. Rita Avatar

    You’ll run the SharePoint Preparation Tool, which installs all of the pre-requisites (thank you, Microsoft!), and then run setup ielstf. a0Once installed, you’ll run the SharePoint Configuration Wizard to configure your basic server components (databases, Central Admin, etc). a0 a0Running the Farm Configuration wizard configures your farm, creates the first site collection and allows you to pick the Service Applications to use in this farm.

    Like