Hello all,
I am trying to dynamically change a public view on the run by creating a plugin. I am able to update the view by updating the fetchxml C# code. I can see my new changes in the solution but not in the UI.
Error is - Cannot read property 'getElementsByTagName' of undefined
After clicking on "publish all customization" changes are not getting reflected. Only way to get the changes in the UI is to open the filter criteria of the view from solution, save it and then click on "publish all customization ". Error goes away and correct view is displayed.
tried publishing all the changes through code, still no luck.
Code looks like
DataCollection<Entity> savedQueries = retrieveSavedQueriesResponse.EntityCollection.Entities;
foreach (Entity ent in savedQueries)
{
Entity view = new Entity("savedquery");
view["fetchxml"] = fetchXml; // Updating fetchxml
view.Id = (Guid)savedQueries.Attributes["savedqueryid"];
UpdateRequest updatePriceListItem = new UpdateRequest()
{
Target = view
};
service.Execute(updatePriceListItem);
}
service.Execute(publishallxmlrequest);
Anyone encountered similar kind of issue.
Thanks,
Chinmay

Report
All responses (
Answers (