Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

JS Question - Hide Field Options using JavaScript

(0) ShareShare
ReportReport
Posted on by 2,355

I've never seen it done before but is it possible to hide an option in a list using javascript?

Any thoughts on how to write this? I've read a bunch of blogs but havent seen anything on this topic.

Thanks!

*This post is locked for comments

  • JakeD2L Profile Picture
    JakeD2L 2,355 on at
    RE: JS Question - Hide Field Options using JavaScript

    Thanks Guido. I figured it out a very similar way.

    Thanks again for your help

  • JakeD2L Profile Picture
    JakeD2L 2,355 on at
    RE: JS Question - Hide Field Options using JavaScript

    Thanks!

    Is this what the function would look like then?

    function Meeting() {

       var Meeting = Xrm.Page.data.entity.attributes.get("new_clientorprospect").getSelectedOption().text;

       if (Meeting == "Client" || Meeting == "Prospect") {

           Xrm.Page.getControl("new_action").removeOption("Strategic");

       }

    }

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans