JSOM Update web part properties doesn't always work

204 Views Asked by At

Here is a code snippet (there is applicable code to get to this point, of course):

var properties = oWebPart.get_properties();

properties.set_item("FilterDisplayValue1", "M");
properties.set_item("TitleUrl", "http://amisherakefight.org");

oWebPartDefinition.saveWebPartChanges();
clientContext.load(oWebPartDefinition);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));

It is to change a Content Query web part's filter programmatically. The code before this leverages .getLimitedWebPartManager() related calls.

What is interesting is that the filter doesn't get changed but the title URL property does.

Any ideas on what is going awry? Thanks in advance...

0

There are 0 best solutions below