web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

After updating a public view can't see the changes after publishing it from code

(0) ShareShare
ReportReport
Posted on by 5

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

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 107 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 92

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans