none
SharePoint 2010

    問題

  • Hi,

    I am new to share point Development 

    My Requirement is as follows

    how to give time schedule for the users as follows

    every day user log in share point site and add new item in the custom list as follows 

    9am to 10 am - create one item if not created item in this time line auto mail send to particular user.

    the same action come to every 1 hour up to 7 PM

    how to set this one.




    2012年6月13日 上午 09:30

解答

  • Hi Maanik,

    Here is a step by step for creating Timer job for your reference:
    http://www.codeproject.com/Articles/403323/SharePoint-2010-Create-Custom-Timer-Jobs

    In the article, we need to replace the DbManager.Insert with methods to update SharePoint list item:
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月18日 上午 09:21
    版主
  • Hi Maanik,

    When the timer job is running, we can check the condition using SharePoint object model(the link I posted in the last reply). When the condition is true, we can use SPUtility.SendEmail to send out the mail:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.sendemail.aspx

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月22日 上午 04:55
    版主
  • We can create the Timer job which will be run in the time slot of 9AM to 7 PM on the hourly basis.

    Then you can check whether item is added in the list within the last hour or not .

    If not added then you can add the item as required and can send the mail to the user using

    SPUtility.SendEMail () methd.

    You can create the custom timer job using the following link

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

    And then can write the checking condition code in the Execute method

    For the first hour, Just fire a CAML query to get the item which were created in between the time slot of 9AM to 10AM. If found the count is greater than 1 Then do not create the item else create item through the following code

    SPListItemitem = list.AddItem();

    Item[“Title”] = "Contacts";

    item.Update();

    Then you can send mail after the successful addition of the item.

    Using SPUtitlity.SendEmail() Method.

    Hope this will help.


    Sharepoint Sutra
    Sharepoint Consultant

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月23日 上午 04:22

所有回覆

  • Hi Manikraj,

    You can follow the below approach to develop the above mentioned functionality:

    1. Develop a SharePoint Timer Service scheduled to run between 9AM to 7PM every hour.
    2. Write the code in the timer job to query the intended SharePoint List and get the list collection of items created as per the required business logic.
    3. Get the SharePoint Users associated with the List like a SharePoint Group who are required to create the items.
    4. Next compare the List Collection Created By against the respective users.
    5. If any user does not has an entry in the List Collection then trigger an email to the user.

    Let me know if you need any further help..

    Thank you,

    Ajey Ghaligi.

    2012年6月13日 上午 10:21
  • Hi Ajey,

    Thanks for your Valuable information.

    i am basically share point Admin. i don't know development (now i am Studying development)

    if u don't mind u have have any coding related with  this requirement please send to me. 

    in my company no developer me only doing all the thinks. 

    Thank you,

    Maanik

        


    Maanik

    2012年6月14日 上午 04:36
  • Hi Maanik,

    Here is a step by step for creating Timer job for your reference:
    http://www.codeproject.com/Articles/403323/SharePoint-2010-Create-Custom-Timer-Jobs

    In the article, we need to replace the DbManager.Insert with methods to update SharePoint list item:
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月18日 上午 09:21
    版主
  • hi Jinchun Chen,

    i want e mail sending timer jobs

    in a particular custom list item. add the new item while one hour duration

    if u have any idea would please teach me 


    Maanik

    2012年6月18日 上午 10:48
  • Hi Maanik,

    When the timer job is running, we can check the condition using SharePoint object model(the link I posted in the last reply). When the condition is true, we can use SPUtility.SendEmail to send out the mail:
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.sendemail.aspx

    Thanks,
    Jinchun Chen


    Jinchun Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff AT microsoft.com(Please replace AT with @)

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月22日 上午 04:55
    版主
  • We can create the Timer job which will be run in the time slot of 9AM to 7 PM on the hourly basis.

    Then you can check whether item is added in the list within the last hour or not .

    If not added then you can add the item as required and can send the mail to the user using

    SPUtility.SendEMail () methd.

    You can create the custom timer job using the following link

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

    And then can write the checking condition code in the Execute method

    For the first hour, Just fire a CAML query to get the item which were created in between the time slot of 9AM to 10AM. If found the count is greater than 1 Then do not create the item else create item through the following code

    SPListItemitem = list.AddItem();

    Item[“Title”] = "Contacts";

    item.Update();

    Then you can send mail after the successful addition of the item.

    Using SPUtitlity.SendEmail() Method.

    Hope this will help.


    Sharepoint Sutra
    Sharepoint Consultant

    • 已標示為解答 Pengyu Zhao 2012年6月25日 上午 01:21
    2012年6月23日 上午 04:22