Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Change sub grid column titles based on selected view in D365 Portal

Posted on by 815

Is there way I can change a column title in a  sub grid  located on a D365 portals entity form without  using entity form meta data for the sub grid . The Reason for this is that I have a sub grid with multiple views and there are two fields which need to be titled differently base on the view selected.  Some example JavaScript would be great

 

Your input would be great

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Change sub grid column titles based on selected view in D365 Portal

    Hi,

    You can write a function on change of view and execute the below code in order to change the column name dynamically. Please make sure to change the hierarchy of the table to your column name:

    if(viewName== "firstView")

    {$('table[data-name="YourValue"] > thead > th:first').innerText="Some Name";

    }

    else if(viewName == "SecondView")

    {

    $('table[data-name="YourValue"] > thead > th:first').innerText="Some Other Name";

    }

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