Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Unable to remove JavaScript on view column

(1) ShareShare
ReportReport
Posted on by 56
Hi everyone
 
I'm not a Dynamics expert and am struggling with an issue that's come up on our Dynamics environment, which was created by people who are no longer with our company.  We've got some JavaScript setup on a custom Status column in a view, which used to display an icon based on the value.  However, since the new modern UI in Dynamics, this doesn't work so I need to remove the JS.  As I'm unsure of how the whole thing is setup I didn't want to delete the JS web resource so I was hoping to just remove it from the column in the views where it's set.  If I go into the Classic view screen and click Change Properties on the column I can see the reference to the JS:
 
 
I can also remove the web resource here and save the changes.  However, as soon as I save and publish the view itself in the modern solution UI the web resource reappears in the column properties.  If I try using the classic solution UI the web resource doesn't reappear as above but the view still shows the formatting.
 
Is there anywhere else I need to check to remove this JS from the view?  Thanks in advance for your help.
  • LedgerJames Profile Picture
    LedgerJames 4 on at
    Unable to remove JavaScript on view column
    Thank you.
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,785 Super User 2024 Season 1 on at
    Unable to remove JavaScript on view column
    After removing the changes on the view you are publishing the changes correct? If no please click on the entity and then publish it or you can click on the publish all customisation on top.
  • Unable to remove JavaScript on view column
    Heey,
     
    Check if the same JS function is still enable on the table events, if it´s there, you should remove it too.
    You will need to use the old solution interface to access it.
     
     
    Regards,
    Jimmy Passeti | Microsoft MVP
    Please mark as Verified if this answered your question!
     
  • gjayn84 Profile Picture
    gjayn84 56 on at
    Unable to remove JavaScript on view column
    To be honest, that's why I didn't want to delete the web resource and want to just remove the reference to it in the affected column.  I've managed to do this and can confirm that the JS isn't being called when the view loads, but the colour still appears.  This only seems to affect the Power Apps grid control view though.  If I change the Show As option to Read Only Grid then the formatting is removed:
     
  • VaHiX Profile Picture
    VaHiX 3,323 on at
    Unable to remove JavaScript on view column
    Ensure that no other views or components are dependent on the JavaScript web resource. Sometimes, removing a web resource can cause issues if it's being used elsewhere.
     

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans