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

Similar Messages

  • How to update managed metadata column for all file in document library using powershell

    Hi,
    How to update managed metadata column for all file in document library using powershell?
    Any help on it.
    Thanks & REgards
    Poomani Sankaran

    Hi TanPart,
    I have changed the code which you have give in order to get the files from SharePoint 2010 Foundation  Document Library.But i am getting below error in powershell.
    Property 'ListItemCollectionPosition' cannot be found on this object; make sure it exists and is settable.
    Could you tell me which is the issues in it?
    See the code below.
    $web = Get-SPWeb http://ntmoss2010:9090/Site
    $list = $web.Lists["DocLib"]
    $query = New-Object Microsoft.SharePoint.SPQuery
    $query.ViewAttributes = "Scope='Recursive'";
    $query.RowLimit = 2000
    $caml = '<Where><Contains><FieldRef Name="Title" /><Value Type="Text">Process Documents/Delivery</Value></Contains></Where>' +
            '<OrderBy Override="TRUE"><FieldRef Name="ID"/></OrderBy>'
    $query.Query = $caml
    do
        $listItems = $list.GetItems($query)
        $spQuery.ListItemCollectionPosition = $listItems.ListItemCollectionPosition
        foreach($item in $listItems)
            #Cast to SPListItem to avoid ambiguous overload error
            $spItem = [Microsoft.SharePoint.SPListItem]$item;
            Write-Host $spItem.Title       
    while ($spQuery.ListItemCollectionPosition -ne $null)
    Thanks & Regards
    Poomani Sankaran

  • Unable to update SharePoint List Programmatically in SharePoint Online - Anonymous Login

    We are unable to programmatically update SharePoint lists with Anonymous access in Office 365 - SharePoint Online site. That is, in a public facing SharePoint Online Site, we have a Contact Us Page and when submitted, we would like to store that item in
    a List and then also a trigger an e-mail notification? We are unable to do that using SPServices or CSOM because the code is not firing as the user is logged in anonymously. How do we do this?
    Karthick S

    Naveen,
    I tried this solution and I am getting correlation error .Can you please check this?
    Error is:
    "Web Part Error: Solution failed validation. Correlation ID: e225e49c-c008-1000-ae6e-eeb998cf42af."

  • 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 

  • Workflow - how to update multiple list items

    Is it possible to update up to 3 list items with the same information using a workflow?  My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3.   I
    have two separate lists - one for vehicles (fleet list) and one for drivers (driver database).  In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
    in the driver database.  I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
    Thanks

    Hi,
    Refer to the following threads about how to update multiple list items simultaneously.
    http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Does anyone know how to update/recompile PHP to include IMAP?

    I've just installed phplist (http://www.phplist.com/), which is a newsletter mailer based on php. Some of the features require that IMAP be installed with the php installation. Evidently Apple's OSX install does not include IMAP in PHP by default, but presumably IMAP can be added if PHP is recompiled. (See http://www.php.net/manual/en/ref.imap.php). I was planning on updating PHP using Alex's very helpful tutorial, available at http://osx.topicdesk.com/content/category/4/18/62/, and at the same time adding IMAP.
    Altho Alex does not touch on IMAP in his tutorial, I believe that to includ IMAP in the PHP installation, the configuration string must include "--with-imap-ssl=/sw --with-imap=/usr/share/c-client", or something similar. In any event, it seems that "c-client" does not live in /usr/share nor anywhere on my system, so I have not attempted an installation so far.
    Does anyone know how to update/recompile PHP to include IMAP? And if "c-client" is required, how do I intall that first?

    Disregard last post--that was a non-starter, but I think I have a successful installation, which I will post here as the documentation on this from php and from phplist is pretty bad:
    First get and compile the c-client library, which is necessary for those wanting to run phplist:
    sudo mkdir -p /SourceCache
    cd /SourceCache
    sudo curl -O ftp://ftp.cac.washington.edu/imap/c-client.tar.Z
    sudo tar xzf c-client.tar.Z
    cd imap-2006h
    sudo make oxp
    sudo mkdir lib
    sudo mkdir include
    Next open /SourceCache/c-client and drag all the */.h files (including the aliases) into “include.” Then drag all the */.c files (aliases too) into “lib”.
    Find “c-client.a” and change name to "libc-client.a" and place in the lib folder.
    Correct permissions on lib and include.
    Finally install php (cheers to Alex) as follows:
    cd /SourceCache
    sudo curl –O http://us.php.net/distributions/php-4.4.7.tar.gz
    sudo tar xzpf php-4.4.7.tar.gz
    cd /SourceCache/php-4.4.7
    sh
    CFLAGS=-DBIND8COMPAT
    export CFLAGS
    sudo ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-imap=/SouceCache/imap-2006h --without-pear
    sudo make
    sudo make install
    sudo apachectl graceful restart
    exit
    One last question, Alex: can I safely delete the SourceCache folder now that the installation is complete? My only concern is that the config string points to items in the folder, and I'm wondering whether I ought to have placed them inside /usr/share instead of SourceCache, or doesn't it make a difference?
    Lost count Mac OS X (10.4.9)

  • WebPart average of a SharePoint list column

    Hello;
    I need a Web Part that displays the average of a SharePoint list columns
    thank you

    Open the AllItems.aspx page of that list in SharePoint Designer
    Select a title and right click on it. Format item As -> Hyperlink to -> Edit Form
    This will redirect you to edit form when the title column link is clicked.
    But if you want to show the modal pop up it edit mode, open the Allitems.aspx page in designer
    Select the list view web part, on the ribbon in the List View Tools -> Design tab -> Customize XSLT -> Customize Entire View
    Switch to the code view, search for FORM_DISPLAY and change it to FORM_EDIT.
    jayant prabhakar

  • How do I Create a SharePoint List with two Attachment fields

    Hi Everyone
    I am using SharePoint 2013 Enterprise and Visual Studio 2013.
    I need to create a SharePoint list that has two fields of attachment type.
    Possible is a list supports this functionality natively?
    Tanks in advance.
    Eduardo

    Hi Muruguesa!
    When I customize the form in InfoPath Designer the following message appears:
    The publish operation Could Not Be completed. It can not be determined if the form template was successfully published. Try publishing the form template again, or change the settings to list
    Catastrophic failure
    I reported this error recently but not yet success in solving the problem:
    https://social.msdn.microsoft.com/Forums/office/en-US/687f2282-ad3d-4d13-a548-d25641b6b293/cannot-edit-form-in-infopath-when-list-was-created-in-visual-studio?forum=sharepointcustomization
     Do you have any ideas on how I can solve this case.
    PS: My list was created on Visual Sudio an Im using  SharePoint 2013 Enterprise and Visual Studio 2013.
    Thanks

  • Invalid data has been used to update the list item. The field you are trying to update may be read only.

    Trying to follow Serge Luca's Step by Step Tutorial. Creating Workflows for Windows Sharepoint Services and MOSS2007.  http://sergeluca.spaces.live.com/blog/cns!E8A06D5F2F585013!859.entry
    I have an onWorkflowActivated, followed by an ifElse condition and a log to history.
    In the IfElse, each branch has a code segment, that trys to update the status column in the list that the workflow is attached to.
    private void Authorize_ExecuteCode(object sender, EventArgs e)
    // tried serveral methods
    WorkflowProperties.Item["Status"] = "Automatically Approved";
    // tried all of the following (one at a time)
    item.update();
    WorkflowProperties.Item.Update();
    WorkflowProperties.Item.SystemUpdate();
    //tried this as well.
    Microsoft.SharePoint.SPListItem item = WorkflowProperties.Item;
    item["Status"] = "Automatically Approved";
    item.Update() ;
    On the update call I keep getting "Invalid data has been used to update the list item. The field you are trying to update may be read only."
    Could someone explain how to update "Status" column of the list item that the workflow is working on?
    Thank you very much.
    Bill
     

    Hi:
    you can do the following:
    add the following code to the workflow.xml file (under the MetaData section)
    Code Snippet
    <ExtendedStatusColumnValues>
    <StatusColumnValue>Branch1</StatusColumnValue>
    <StatusColumnValue>Branch2</StatusColumnValue>
    </ExtendedStatusColumnValues>
    then add 2 SetState activities one in each branch of the IfElse.
    for the code behind of setState1 (branch1) write the following code:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max);
    for setState2 (branch2) write the following:
    Code Snippet
    state = Convert.ToInt32(SPWorkflowStatus.Max) + 1;
    where state is the variable assigned to the field State in the properties of the SetState(design lever), or instead of state u can use the following code:
    Code Snippet
    ((SetState)sender).State
    where sender is the object sent through the function parameter.
    hope this answered your question
    Best Regards

  • How to Insert Sharepoint 2013 Person or Group Field using VBA

    Hello,
    How to Insert Sharepoint 2013 Person or Group Field using VBA , I tried set the field with ID / ID;Name / Name
    but all failed, Please advice 
    Function SetSP_Field(F_Yer As Single, F_WekNo As Single, F_ProjectNum As String, strField As Variant, strFieldValue As Variant) As String
    ' test code
        Dim rst         As Recordset
        Dim strSQL      As String
        Dim SP_RecSet   As ADODB.Recordset
        Set SP_RecSet = New ADODB.Recordset
        SetSP_Field = False
        strSQL = "Status Report"
        On Error Resume Next
        Call SP_Connect(2)
        strSQL = "select " & SP_List & ".* From  " & SP_List _
               & " Where [Year] = " & CInt(F_Yer) _
               & "   and [WeekNo] = " & CInt(F_WekNo) _
               & "   and [Compass_Code] = '" & F_ProjectNum & "' ; " _
    '           & " Set " & strField & " = " & strFieldValue
        'Debug.Print strSQL
        'Debug.Print SP_CN
        SP_RecSet.Open strSQL, SP_CN, adOpenStatic, adLockOptimistic
        If SP_RecSet.RecordCount = 0 Then
            Debug.Print "Record for project: " & F_ProjectNum & " not found"
            LogFile.WriteLine ("Record " & strID & " not found")
        End If
        If Not SP_RecSet.EOF Then
            'SP_RecSet.Edit
            SP_RecSet.Fields(strField) = strFieldValue
            SP_RecSet.Update
            If Err.Number <> 0 Then
                MsgBox ("SP Update Error: " & Err.Description)
                GoTo Exit_Fun
            End If
            SetSP_Field = True
        End If
    Exit_Fun:
        SP_RecSet.Close
        Set SP_RecSet = Nothing
    End Function

    Hi Tim,
    Let’s verify the followings:
    Whether this issue occurred for other lists in the same site.
    Whether this issue occurred for all users who don’t have full control.
    Whether this issue occurred on other sites.
    When you created the people & group column, which show field did you used? Please try to use a different show field for the people & group column, compare the result.
    In addition, please check if the link is useful:
    http://www.learningsharepoint.com/2013/08/21/empty-value-in-people-picker-after-saving-the-list-form-in-sharepoint/
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Invalid data has been used to update the list item. The field you are trying to update may be read only (Lookup Field).

    Hi.
    I am getting below error while adding value to look-up field.
    Invalid data has been used to update the list item. The field you are trying to update may be read only.
    I have tried many forums ans post but didn't come to know what's the root cause of issue. I am also posting Code for creating and adding lookup field.
    CAML to create lookup field (It works Fine)
    string lkproductNumber = "<Field Type='Lookup' DisplayName='Product Number' StaticName='ProductNumber' ReadOnly='FALSE' List='" + pNewMaster.Id + "' ShowField='Product_x0020_Number' />";
    Code to insert value to lookup field
    ClientContext client = new ClientContext(SiteUrl);
    client.Load(client.Web);
    client.Credentials = new NetworkCredential(this.UserName, this.Password, this.Domain);
    // Lookup Lists
    List pmList = client.Web.Lists.GetByTitle("Product_Master");
    //List Conatining Lookup Columns
    List piList = client.Web.Lists.GetByTitle("Product_Inventory");
    client.Load(piList);
    query.ViewXml = "<View/>";
    ListItemCollection collection = pmList.GetItems(query);
    client.Load(collection);
    client.ExecuteQuery();
    int prodid=0;
    foreach (ListItem item in collection)
    if (Convert.ToString(item["Product_x0020_Number"]) == ProductNumber)
    { prodid = Convert.ToInt32(item["ID"]); }
    ListItem piItem = piList.AddItem(new ListItemCreationInformation());
    piItem["Product_x0020_Number"] = new FieldLookupValue() { LookupId = prodid };
    piItem.Update();
    client.ExecuteQuery();
    Exception Detail
    Microsoft.SharePoint.Client.ServerException was caught
    Message=Invalid data has been used to update the list item. The field you are trying to update may be read only.
    Source=Microsoft.SharePoint.Client.Runtime
    ServerErrorCode=-2147352571
    ServerErrorTypeName=Microsoft.SharePoint.SPException
    ServerStackTrace=""
    StackTrace:
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
    at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
    at WebServiceProviders.ClientServices.NewProductInventory() in Z:\.............ClientServices.cs:line 889
    InnerException:
    Quick response is highly appreciated.
    Thanks
    Mehar

    Try some thing like below,
    your data value that needs to be update should be in this format "ID of the lookup";#"Title of the Lookup" 
    For example,
    listItem["Product_x0020_Number"]
    = "1;#iPhone";
    listItem["Product_x0020_Number"]
    = "2;#Mobile";
    Hope this helped you....

  • How to update selected list items in SharePoint 2010?

    Hello All
    I have a list containing field named "Category". I want to develope a solution which will take two inputs: Old Category and New Category. The expected result is: all the list items will be fetched which have Old Category input value in
    their category field and the field is replaced with the input value New Category.
    I have a limitation that I can not use Visual Studio. So I am thinking to create aspx page with content editor webpart. But I am new to all these things. Could you please suggest the development approach for this?
    Thanks.

    Hello,
    I don't think CEWP can help you because you won't be able to find old and new category when there is any change in list. However you can identify the latest modified item from list but how will you identify whether category is old or new. If you have any
    other column in list which can tell you that category value has been updated then you can write ECMA or Jquery script to update other items.
    If have any column in list then see below jquery code, where you will see how to query the list: (In my case it is Active)
    var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
    soapEnv += "<listName>Highlights</listName>";
    soapEnv += "<query><Query><Where><Eq><FieldRef Name='Active' /><Value Type='Text'>Yes</Value></Eq></Where><OrderBy Override='TRUE'><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy></Query></query>";
    soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='Links'/></ViewFields></viewFields><rowLimit></rowLimit>";
    soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>";
    Please comment if i misunderstood you?
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to make a SharePoint list column ReadOnly using Sharepoint designer

    Hi,
             I am new to sharepoint. Need to make a few columns readonly in a sharepoint list.  Not sure how. Any help is appreciated.
    Thanks

    Here is one more Simple and Best practice to be fallowed using powershell
    http://soreddymanjunath.blogspot.in/2014/04/readonly-field-using-powershell.html
    Cls
    Add-PSSnapin "Microsoft.Sharepoint.Powershell"
    $web= Get-SPWeb -Identity "http://test.dev/sites/Wftest"
    $ls=$web.Lists.TryGetList("test");
    $flds=$ls.Fields["CustID"]
    $flds.ReadOnlyField=$true
    $flds.Update();
    Note:  If
    ReadOnlyField =TRUE,
    the field is not displayed in New or Edit forms 
    ReadOnly to TRUE hides
    the field from Site Settings pages for managing site columns and content types. Setting the Hidden attribute
    to TRUE completely
    hides the field from the UI. 
    Default  ReadOnlyField value
    is set to false.
    Best Practice is to Use 
    $flds.ShowInDisplayForm=$false;
    $flds.ShowInEditForm=$false;

  • Update SharePoint list with project finish date on Project.Updated event

    Hello,
    I want to update a column in a SharePoint list with the project finish date when a project is updated on Project Server. My OnUpdated event handler is being called ok, but if I change the project start date Project Server runs an asynchronous republishing
    on the project, and my event handler ends up being called before the finish date is update by the republishing job, so the code writes the "old" finish date on the SharePoint list. The solutions I could think of are:
    Identify the republishing job on Project Server queue, pool the queue waiting for it to finish, then read the finish date and update the list item in SharePoint.
    Include a custom job on Project Server queue after the republishing job, that reads the finish date and update the list item in SharePoint.
    I don't know if any of the solutions are feasible and how to implement them. Has anyone coded something like this and/or have a better solution?
    Thanks,
    GB

    I vote for the option 1.
    I did for one of my event handler..Did you try "on published" event?
                projectSvc.QueueUpdateProject(jobUid, SessionUID, projectDss, false);
                //WaitForQueue(q, jobUid);
                jobUid = Guid.NewGuid();
                projectSvc.QueuePublish(jobUid, e.ProjectGuid, false, string.Empty);
                jobUid = Guid.NewGuid()
    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

  • How to retrieve sharepoint list data and show it on excel-addin using C#

    Hi,
    we have a sharepoint list where all students are present. we wanted to get the data from the list and show it via excel addin (VSTO) (something like save,retrieve buutons) . we have some more business logic which need to be performed before the data is retrieved
    . once data is shown on excel , user modifies it and update/save the record back to sharepoint.
    can you please give some samples and suggest any links to start with development.
    Thanks
    chaitu

    Hi chaituatp,
    For this requirement, I would suggest you to get familiar with how to create VSTO applications, and how SharePoint object model works. Here are some sample code about this:
    How to: Retrieve List Items using JavaScript:
    http://msdn.microsoft.com/en-us/library/hh185007(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
    VSTO application show data in datagridview:
    http://stackoverflow.com/questions/16926275/simple-example-of-vsto-excel-using-a-worksheet-as-a-datasource
    Thanks,
    Qiao
    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
    [email protected]
    Qiao Wei
    TechNet Community Support

Maybe you are looking for