셰어 포인트의 목록 콘텐츠를 프로그래밍 방식으로 업데이트

안녕 Devs,

아래의 프로그래밍 셰어 개체 모델을 사용하여 SharePoint 목록의 콘텐츠를 업데이 트하는 샘플 코드입니다.

SPSite 사이트 = 새로운 SPSite(“HTTP를://로컬 호스트:21000”);
SPWeb 웹 = Site.OpenWeb();
SPList 목록 = Web.Lists[“주소록”];
SPListItem Listitem은 = List.GetItemById(0);

문자열하면 FullName = string.Empty;

하면 FullName = ListItem[“FIRSTNAME”].ToString() + ListItem.[“성”].ToString();
SPListItem[“하면 FullName”] =하면 FullName;
ListItem.Update();

4 comments to Programmatically Update List Content in SharePoint

  • noreply@blogger.com (lis)

    안녕 Uday,

    I have a custom list “Weekly Activity”, this is supposed to be entered daily and checked weekly. The problems I face are as follows:

    1. Team members can enter the activity daily but I am not being able to categorise it on a week basis( I used the group by facility but that does not give me what I want). that is Sunday to thursday week.

    2. I have a “Checked By” field which is meant only for the manager.. but the team members are being able to edit this field.

    3.Once an activity is checked by the manager, no team member should be able to go back and edit it.

    Kindly tell me how I can do the above on my custom list.

    thanks and Regards,
    lis

  • noreply@blogger.com (siva)

    안녕 Uday,

    where do you write this code. On what event

  • noreply@blogger.com (Uday)

    Hi Lis,
    as of now we dont have column level security available OOB in MOSS.

    My suggestion would be write a event handler and on “saving” event, then verify the person belongs to which while updating the content to list. based on the group he/she belongs to you can update the content.

    고마워,
    ~ Uday

  • noreply@blogger.com (Uday)

    Hey Siva,
    you can use this piece of code based on your business requirement.

    for eg.
    you can use this in event handler to update the calculated value in your custom column based on the values entered by the users.

    고마워,
    ~ Uday.

답변을 남겨주세요

사용할 수있는 이러한 HTML 태그

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>