Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to edit or update list view on dashboard using Javascript

Posted on by 547

Hello All, I am working on creating custom Dashboard. My initial requirement was to create few buttons on a dashboard and clicking on respective buttons would show the view. I was able to achieve this by keeping Iframe on Dashboard at it worked fine as required. But the problem occurred when user tried to open a view which I have set in Iframe, it will only open in that particular Iframe and not in Entire page and I think it is the normal behavior. So What I thought was using List view on my dashboard component, which is also fine but I want to have the View list depending on the button clicked. When I went into Developer Tool for IE what I found out is below

<a tabindex="0" title="Dient zum Auswählen einer Ansicht." 
class="ms-crm-View-Name" id="Component2290929_SavedNewQuerySelector" 
style="text-decoration: none; position: relative;" onclick="return false;" 
href="javascript:;" gridid="Component2290929"
 currentview="{29F67FCF-B9BE-E111-8BE4-00505693000C}">
 <span class="ms-crm-View-Name ms-crm-ViewSelector-title-subGrid-lite ms-crm-TextAutoEllipsis"
 style="width: auto;" currentviewtype="1039" 
 quickfindquery="{8DF19B44-A073-40C3-9D6D-EE1355D8C4BA}" 
 userownedview="{29F67FCF-B9BE-E111-8BE4-00505693000C}"
 userselecteddefaultview="" 
 defaultsavedqueryview="{29F67FCF-B9BE-E111-8BE4-00505693000C}"
 currentview="29F67FCF-B9BE-E111-8BE4-00505693000C"> Kontakte</span>
 <span class="ms-crm-View-icon ms-crm-ViewSelector-dropdown-icon-subGrid-lite">
 <img class="ms-crm-View-icon-subGrid-lite ms-crm-ImageStrip-Dropdown_Arrow"
 alt="Dient zum Auswählen einer Ansicht." src="/_imgs/imagestrips/transparent_spacer.gif?ver=1310230233">
 </span></a>

how would I update Span class in such a way that I could show the view which is required.

Also on Developer tool I tried to update directly the view id's but the view is changing only Name i.e here "hello" would be changed to anything I want.

Could you guys please let me know your inputs






 

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans