1

I've tried lots of workarounds and have come up with nothing. I'm trying to do this: https://stackoverflow.com/questions/25595512/javascript-csom-to-access-page-properties

But since I need a page that is not the current one, I don't have access to _spPageContextInfo. If it makes any difference, I'm also using a custom column that is from my content type that inherits a web-part page.

I've tried this with no luck:

function onListItemUpdateSucceeded() {
var clientContext = new SP.ClientContext(this.storedAddress);
var currentList   = clientContext.get_web().get_lists().getByTitle('Site Pages');
this.currentItem  = currentList.getItemById(6); //hard coded what should be 6 which should be consistent
currentItem.set_item('CustomName', this.storedTitle);
currentItem.update();
clientContext.executeQueryAsync(Function.createDelegate(this, this.onSiteUpdateSucceeded), Function.createDelegate(this, this.onQueryFailed));}

I an error that 'CustomName' doesn't exist. I tried 'Title' as well so I don't think it's my custom column that is the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.