How to do timer job to update another list?

Hi all,
If i update a field in a SharePoint list, then I want to update the same field which is in the another list item. Yes, I know to use timer job, but lack code idea. Could anyone help to give any sample code to update a particular column in other sharepoint
list items? Thanks!

Hi Sam,
Timer job runs as per the schedule, in this case, when the user updates a field in SharePoint List, you want to update the same field in the different list, 
how about using a Event Receiver, so you can have an ItemUpdated event in the source list, and when anything is updated, update the other list item as well.
Thanks
Senthu
Please mark is as Answer if it resolves your query or Vote if its helpful

Similar Messages

  • How to send timer job email to "assigned to" feild value in a task list?

    Hi All,
    How to send timer job email  to "assigned to" field value in a task list if due date is after two days from now?

    Create a SharePoint Designer Workflow and use "pause until date" option when an new item is created/update.
    Using Server Object model, I believe you can create the timer job from item event receiver.
    --Cheers

  • Update another list when list is updated

    What do you recommend to update another list when the current list is updated.
    I have a workflow which updates a Reports list. I also have a favorites list which has 4-5 columns which are in the reports list and I would like to update those values when the reports list is updated. I use a workflow to update the reports list.
    Thanks

    Hi CoutinhoR, 
    You could use your existing workflow to update the favourites list (after it has updated the reports list). 
    Another way, would be creating an event receiver that updates the favourites list whenever an item in the reports list is added, modified or deleted. 
    It depends on the functionality you need to achieve. If you are just incrementing the value of the columns for a single item in the favourites list (when a report is updated), then using the existing workflow would probably work best.
    Regards, Matthew
    MCPD | MCITP
    My Blog
    View
    Matthew Yarlett's profile
    See my webpart on the TechNet Gallery that allows administrative users to upload, crop and format user profile photos. Check it out here:
    Upload and Crop User Profile Photos

  • HT204135 how to re print job from print queue listing on a mac?

    how to re print job from print queue listing on a mac?

    Hello there! Welcome to the forums @technolingua ,
    I read about how you are looking to print envelopes from Mavericks. I would suggest checking out the links below to help you out!
    Create envelopes by using Mail Merge
    Print Envelopes (Mac)
    How to Print Envelopes on a Mac
    Best wishes
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Workflow on folder level to update another list

    Hi there,
    I have folder structure like folder1/folder2/folder3
    there are wiki pages in these folders
    When I create a new wiki page in one of the folders say folder3 I want an item to be created in another list which has name same as the wiki page name.
    I tried to write a workflow on site pages library(because it gave me that option only). It does not seem to workout.
    Can I write a workflow to achieve this task..??
    Any help will be highly appreciated...
    Many thanks in advance...

    Hi,
    Per my knowledge, we can't set the list which has name same as the wiki page name in workflow.
    So, we can use a Event Receiver to achieve your requirement.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to load Time Capsule on updated hard drive

    The hard drive on my 2007 Macbook crashed, and it was replaed (was a recall for my hard drive, so replaced with similar HD loaded with OS X). On the initial set-up, I wasn't able to load straight from Time Capsule (prompted for "x509anchors" password, also asked for logins/passwords that Im not sure I entered correctly), so I chose to do it later.
    I completed the basic setup (choosing language, country, etc) and found the Time Capsule. I was able to connect to it and can see a sparse bundle file as well as some other files I stored on it. But I can't figure out what I need to do to load/restore it back with all the pre-crash info.
    The sparse bundle file is 260GB - connected with an ethernet cord, how long will the process take?
    A little nervous to mess anything up as I'm scared to lose anything - this backup is all I have.

    bas351 wrote:
    Is there an easy fix to clear the gray screen, or do you think there may be something corrupted that I restored from my Time Machine
    Probably. Apparently whatever was going wrong with your HD corrupted some things, which got backed up, then brought back with the restore.
    (should I try to restore from a previous TM date - as opposed to the most recent)?
    Given how long it took, I'd recommend just installing OSX. If you're on Snow Leopard, that won't affect anything else. If you're on Leopard, you'll need to do an +Archive and Install.+ Then download and install the "combo" update. See [Installing the ''combo'' update and/or Reinstalling OSX|http://web.me.com/pondini/AppleTips/Combo.html].
    Once you get it running, check as many apps and data files as you can; some of them may have been corrupted, too. If so, you should be able to selectively reinstall them from older backups via the "Star Wars" display. See #15 in the FAQ.
    By the way, please click +My Settings+ at the right of this page and supply the details of your Mac and what version of OSX you're running.

  • How to configure Time Capsule to add another 2GB of storage via USB External Hard Drive?

    Hi All, I've recently added an external 2GB hard drive via USB to my 1GB Time Capsule as I had reached capacity.  Time Capsule recognises the new 2GB hard drive so I know I have got that at least that bit right! But... I cant seem to figure out how to configure TC to add the extra 2GB to the current 1GB it already has for a total of 3GB?  Under 'Select Disk' I can select either one or the other but I can't find a way to 'merge' them both. So a couple of questions:
    - Is this even possible?
    - If I have to keep them seperate, is there way to select different folders to back up to the different drives? E.g. back up all my music files to one of disk and all my movie files to another?  I tried it but is seems like the options apply to time capsule regardless of the drive I select.
    Any assistance you can provide would be most appreciated.
    Regards, Justin

    - Is this even possible?
    Sorry, but no. You will not be able to combine the drives as one as the Time Capsule does not offer any type of RAID function.
    - If I have to keep them seperate, is there way to select different folders to back up to the different drives? E.g. back up all my music files to one of disk and all my movie files to another?  I tried it but is seems like the options apply to time capsule regardless of the drive I select.
    Not directly with Time Machine (TM). You would need another backup solution, and then, run two separate backups (with the specific folders of interest); one on each HDD.

  • How to trigger a job from the another job?

    Dear Pals,
    Im new to Business objects data integrator 11.7.2.3. 
    Requirement :
    I have two jobs JOB1 and JOB2. JOB2 to be executed only after completion of JOB1.Please do let me know how to meet this requirement.
    Thanks in advance.
    Regards,
    Diras

    export the execution command for both the jobs from the web admin batch job history page
    this will export the job launch command to a .bat or .sh file depending on OS to %LINK_DIR%/log directory
    you can call these jobs in another script in sequence
    or if you are looking for lanuching Job2 only if Job1 is successful, then in the Job1 you can add a script at the end and call the script (to which the execution command is exported) for Job2 by using the exec function

  • How to set a job ran after another job finished?

    Dear Experts,
    Our requirement is to have 2 JOBs defined in SAP:
    JobA and JobB
    The requirement is JobA will firstly ran and finished everyday.
    Then JobB will start to run upon JobA finished everyday also.
    Then what i did is set 2 jobs, and set JobB ran after with JobA. I set JobA's name in 'After Job' for JobB.
    Right now, the issue is:
    JobB will run after JobA, but only could run one day..
    The next day after JobA finished, JobB will not run...
    Please kindly help what issue here??
    Thank you very much.

    Dear Hoo,
    It is possible to follow one job after another.
    For this set up please go to transaction "SM36"
    fill your details and then press "Start condition" a new screen opens where you can see several tabs,
    and there is one tab with "After Job" , please enter the name of Job e.g jobA.
    here you can set all the conditions to start a new job.
    I hope this solves your problem.
    Regards,
    Paresh

  • How to Disable Event firing while updating a list item using poweshell

    Hi All,
    I am working on a powershell code which updates most of the list items in the entire web application. I am using SystemUpdate($false) to update the items so that 'modified' and 'modified By' and versions are not changed.
    However event receivers gets fired which is now a problem. I want to disable the Event receivers before update and enable it after update. I want powershell code for this. I am using SharePoint 2010.
    Your help would be much appreciated. Thank you in anticipation.
    Regards
    Karthik R.

    hi
    check this thread:
    How to disable event firing outside an event. It contains example on C#, but it is not difficult to convert it to PowerShell.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How to create time column in SharePoint custom list.

    Hi,
    Actually my requirement is, I should create a Custom List in SharePoint which should has "Effort" column with the "Time" type.
    User Should enter only Hours and minutes in that field. How should i do it?
    By Default we can have "Date and Time" or "Date" alone. There is no feature to have only "Time" :(
    Thanks in advance.
    Poomani Sankaran

    you can use JSLink script for that. You can use text field attache JSlink script and change her client side rendering. some information and samples about client side rendering: https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a
    I's good because in worst case you will have pure SP text field. In case of migration to new version or cloud you will have no problems. 
    Even more you can attache Jquery UI Time spinner http://jqueryui.com/spinner/#time or you can download Time picker extension http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/
    and create fancy time picking design.
    Tomas.

  • Create Timer Jobs dynamically using code (on the fly)

    What I am trying to accomplish here is different from the usual "Create and deploy a new custom timer job". So please co operate.
    Scenario : I have around 200 lists in my site. Each list gets its data from a third part web service (cutom code / not BCS). The data retrieval happens via Timer Jobs. The Timer Jobs call the web service, gets the fresh data and updates the
    list items. This is currently working fine with multiple lists and 1 timer job to refresh the data.
    Problem : Now the issue I am facing is, each of the lists have its own Refresh Frequency. Say List 1 to 30 needs to be refreshed every 5 mins. List 31 to 60 every 10 mins, etc. I am currently handling this by having a RefreshLastRun timestamp.
    This works fine in most of the scenarios - unless the Web service returns large data, in which case it takes more than 5 to 10 mins for the Update to complete on 4 to 5 lists. At the same time, the other lists - they were supposed to be updated 5 mins ago,
    but are still waiting to get updated because the timer job is busy updating another list, and the refresh is in Que. This is a completely unaccepatable solution to my client because the list with lower frequency duration (5 mins) is of a higher priority than
    the lists getting refreshed every 10 mins.
    My Question is : How do I create a new Timer Job for each list? Whenever I add a new list (through code), I want to create a Timer Job at the same time, which will take care of refreshing the data in this and this list only. This way, I will
    have a independent Timer Job for each list and dont have to depend on 1 timer job to take all the load. With this approach I will have 200 timer jobs running. Which is OK with my client. So I create one class inhereting from SPJobDefinition class, and
    use it repeatedly to create unlimted timer jobs?
    I hope I am able to convey the message. My Timer Jobs are working fine. I dont need suggestions on how to get the timer job working etc. My question is, how do I create a new Job Definition dynamically through code (no deployment).
    Hanif

    I'm afraid this leads to a path where you create a single timer job (or windows service) that uses parallel programming (tpl) to handle all the lists. However, that places a huge burden on you to manage schedules, monitoring etc., something the timer job
    framework handles for you.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • How to update SharePoint list columns including choice fields programmatically?

    Hi All,
    I have a requirement to update multiple columns (which are choice columns) in a SharePoint list.  I'm a newbie at creating event receivers and timer jobs.  Not sure which one to do and where to start first.  There are approximately 4500
    list items in the lists.  I was thinking I could use one list to maintain the Keywords and perform updates or timer job to any targeted lists. 
    Scenario.  Anytime a power user of the sharepoint list wants to update any of the choice field items or possibly even the column name itself, they want to be able to make updates to any of the list
    items or other
    lists that contain the new name.  The columns I'm using are all choice fields named Assigned To, Division, Region, Job Title, Department, and Zone.
    Here's sample code for Updating list:
     using     (SPSite oSPsite = new SPSite("team url/"))   
     using     (SPWeb oSPWeb = oSPsite.OpenWeb())         
     oSPWeb.AllowUnsafeUpdates =   true;          
     // get the List                
     SPList list = oSPWeb.Lists["Keywords"];        
     //Add a new item in the List                
     SPListItem itemToAdd = list.Items.Add();               
     itemToAdd["Title"] = "My Title Field";               
     itemToAdd["Assigned To"] = "Assigned To";               
     itemToAdd.Update();          
     // Get the Item ID               
     listItemId = itemToAdd.ID;          
     // Update the List item by ID                
     SPListItem itemToUpdate = list.GetItemById(listItemId);               
     itemToUpdate["Assigned To"] = "Assigned To Updated";               
     itemToUpdate.Update();          
     // Delete List item                
     SPListItem itemToDelete = list.GetItemById(listItemId);               
     itemToDelete.Delete();                   
     oSPWeb.AllowUnsafeUpdates =   false;         
    Any help is greatly appreciated.  Please provide code sample and references.  Thanks!

    Thanks Ramakrishna -- Here's what I have so far.
    namespace MonitorChanges
            class MyTimerJob : SPJobDefinition
                public MyTimerJob()
                    : base()
                public MyTimerJob(string sJobName, SPService service, SPServer server, SPJobLockType targetType)
                    : base(sJobName, service, server, targetType)
                public MyTimerJob(string sJobName, SPWebApplication webApplication)
                    : base(sJobName, webApplication, null, SPJobLockType.ContentDatabase)
                    this.Title = "My Custom Timer Job";
                public override void Execute(Guid contentDbId)
                    // Get the current site collection's content database           
                    SPWebApplication webApplication = this.Parent as SPWebApplication;
                    SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
                    // Get a reference to the "ListTimerJob" list in the RootWeb of the first site collection in the content database           
                    SPList Listjob = contentDb.Sites[0].RootWeb.Lists["ListTimerJob"];
                    // Add a new list Item           
                    SPListItem newList = Listjob.Items.Add();
                    newList["Title"] = DateTime.Now.ToString();
                    newList.Update();
    Talibah C

  • The Time-consuming each Update sentence in a Procedure???

    If I have a mapping with a procedure that executes 5 Update sentences. It is possible to know How long will time-consuming each Update sentence(I want to see it in the OWB Runtime Audit Browser).
    Is it possible?

    Marcelo,
    If you're asking whether you can get statistics about the throughput of the mapping... these are not necessarily directly in the audit browser, but you can query those from the public runtime views. For example:
    select mr.map_name map_name
    , t.target_name target
    , to_char(r.start_time,'DD-MON hh24:mi') run_date
    , to_char(trunc(r.elapse_time/60))
    || 'm '
    || to_char(r.elapse_time - 60 * trunc(r.elapse_time/60))
    || 's' exec_time
    , r.step_type stp
    , nvl(r.number_records_selected,0) s
    , nvl(r.number_records_inserted,0) i
    , nvl(r.number_records_updated,0) u
    , nvl(r.number_records_deleted,0) d
    , nvl(r.number_records_discarded,0) dsc
    , nvl(r.number_records_merged,0) m
    , nvl(r.number_records_corrected,0) c
    , decode( nvl(r.elapse_time,0)
    , 0, 'N/A'
    , to_char(trunc(r.number_records_inserted / r.elapse_time , 2))
    ) through_put
    , r.end_time - r.start_time exact_duration
    from all_rt_audit_map_runs mr
    , all_rt_audit_step_runs r
    , all_rt_audit_step_run_targets t
    where mr.map_run_id = r.map_run_id
    and mr.map_run_id = t.map_run_id
    and r.step_id = t.step_id
    and r.run_status = 'COMPLETE'
    order by r.start_time
    (run as runtime repository owner; 9.2 compliant)
    Thanks,
    Mark.

  • Update SharePoint list programatically twice a day with SQL 2008 r2

    How complicate is to sustain the update  SharePoint list programatically twice a day by using SQL job?
    the data need  to be update twice a day and it is going o be use to feed a share point form...where the user(S) will be choosing by lookup in infopath form.
    BTW..I do not have control of the SharePoint farm, I have MS SQL 2008 R2 and SharePoint version is 2010. 
    Or Also I am considering to use  MS access 2010 and SharePoint version is 2010.
    CRISTINA&amp MICROSOFT Forum

    >DRAFT IDEA<
    Is this will corrupt SharePoint if I try this?
    The two data list that I want to update twice a day come from other database sources
    One is from Human Resources roster list. (The result of the query) –amount of records >> 600
    UNREAL
    example
    Unique ID
    domain name
    Region
    Badge
    Full Name
    email address
    Manager
    Director
    EUROPE
    EMEA
    123456
    Bear, Charles
    [email protected]
    Hanc, Juilan
    Cano, Oscar
    AMERICAS
    ABU
    223456
    Ros, Adrian
    [email protected]
    Knight, Dexter
    Brown, Dexter
    ASIA-PACIFIC
    APJ
    323456
    Chen, Andy
    [email protected]
    Ducann, Scott
    Ginger, Jeff
    (JOIN) From the roster list connect with the User Information List "user
    credential"(/_vti_bin/UserProfileService.asmx) to allow me Create dependent drop-down by using these articles:
    https://claytoncobb.wordpress.com/2009/06/21/userprofileservice-extended/
    http://sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=172
    http://blogs.msdn.com/b/infopath/archive/2004/03/24/95529.aspx
    http://www.dotnetcurry.com/showarticle.aspx?ID=794
    http://www.codeproject.com/Articles/155829/SQL-Server-Integration-Services-SSIS-Part-Basics
    The second one comes from Account list. (The result of the query) –amount of records >> 22,000
    FAKE
    example
    Unique ID
    email_address
    account_id
    account_lk_id
    account_name
    subdivision_region_name
    subdivision
    support_model
    [email protected]
    22650
    22649
    NANA Web Skills
    AP
    Martial Law
    PunkingSPlus
    [email protected]
    16624
    16624
    ELECTRIC FOOD
    AMER
    Short Circuit Blue
    PunkingSPlus
    [email protected]
    12538
    12538
    100 Got drunk
    EMEA
    100 Got drunk
    PunkingSPlus
    [email protected]
    22206
    22205
    911 Hospital Ghost
    AP
     Hospital AP
    PunkingSPlus
    [email protected]
    6886
    6886
    Administration for UFO LAND
    AP
    Xiamen
    PunkingSPlus
    [email protected]
    22242
    22241
    ACT  Recording
    EMEA
    ACT  Recording  Orange
    PunkingSPlus
    (JOIN) In this list I will need to do the same connect with the User Information List "user
    credential"(/_vti_bin/UserProfileService.asmx)
    To narrow these lists to what they are only responsible to work..
    These two tables are going to be part of InfoPath form ...
    with these draft idea , Do I need to be considering to be using what you suggest ? >>>"PowerShell
    availabe in SQL and the CSOM to interact with SharePoint "
    Could be possible that you can also provide an article?? relate to ....
    "Firstly you must not update SharePoint content databases directly from SQL. Doing so may
    corrupt your farm and will render it unsupported by Microsoft."
    Thanks in advance
    CRISTINA 

Maybe you are looking for

  • Need help in Creating a dynamic name for a file.

    I am working on FTP Put and I have a requirement where in I have to generate the file with dynamic content in its name.I dont need any time stamp.I need to create a variable for this? Help in this regard would be highly appreciated.

  • Re: iPhoto deleting photos from old library and new library

    Hello.  I really hope someone can help me.  I'm about to tear my hair out.  I recently copied my iPhoto library to an external hard drive because I'm seriously out of space on my 24"iMac (2008).  I am a photographer and have a mess of an iPhoto libra

  • Where shoould i specify about my target system in XI.

    Hi all! Xi sends XML file to my J2EE application.I am using HTTP adapter as receiver. I have given the following info in outbound HTTP communication channel:what else to be specified in ID Adapter type: HTTP Message protocol: Xi payload in HTTP body

  • How to get rid of bugs or trojans off of my mac.

    I believe my computer has been bugged.  Long story short, I got rid of cable, my son wanted to watch football, and without permission tried to download a streaming program.  I trashed the downloaded program and cleaned out the bin but I am afraid it

  • Unable to open scanned document

    I'm using an officejet 8600+.  I cannot open documents that have been scanned to a PDF file. This question was solved. View Solution.