Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 App Copy List Item Office365

$
0
0

Hi,

I'm trying to build an app that has a custom menu action, that is able to copy choosed list item and change some metadata automatically.

Need something to start with, this seems to fail when I try to read the item:

function getItemDetails() {

    appWebContext = new SP.ClientContext.get_current();

    hostWebContext = new SP.AppContextSite(appWebContext, decodeURIComponent($.getUrlVar("SPHostUrl")));

    selList = hostWebContext.get_web().get_lists().getById(decodeURIComponent($.getUrlVar("SPListId")));

    selListItem = selList.getItemById(decodeURIComponent($.getUrlVar("SPListItemId")));

    appWebContext.load(selList);

    appWebContext.load(selListItem, 'Title');

    appWebContext.executeQueryAsync(onGetListItemSucceeded, onFail);
}


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>