How to get current list item in announcement list using sharepoint app client object model
hello team,
how current list item in announcement list using sharepoint app client object model .
//gets current item announcement list
splistitem announcementlistitem = properties.listitem;
//store template layout of current item
string templatelayout = convert.tostring(announcementlistitem["templatelayout"]).split('#')[1];
//store description of current item
string templatedescription = convert.tostring(announcementlistitem["body"]);
//store template title of current item
string templatetitle = convert.tostring(announcementlistitem["template"]);
int itemcount;
and how add in publish field , fallowing code server side how call in client side.
//if publishto field organization add in publish field
if (publishto == "organization")
{
user ouser = properties.web.ensureuser("everyone");
spfielduservaluecollection value = new spfielduservaluecollection();
value.add(new fielduservalue(properties.web, ouser.id, ouser.name));
announcementlistitem["publish"] = value;
announcementlistitem.update();
}
please examples .
thanks,
lakshmi
chinnu
please check below thread.
mcts,mcpd sharepoint 2010. blog- http://www.sharepoint-journey.com
if post answers question, please click "mark answer" on post , "vote helpful
SharePoint , Apps for Office and SharePoint > Developing Apps for SharePoint 2013
Comments
Post a Comment