Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Hide statuscode in Incident

Posted on by 690

Good morning everyone,

I use CRM OnLine and need to remove statuscode from Incident two statuscode options, however I am using the Xrm.Page.getControl ("statuscode") method. RemoveOption (3) ;, someone knows how to do?

Tank You.

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Hide statuscode in Incident

    Try the code below.

    
    
    Xrm.Page.getControl("new_fieldname").removeOption(802790001);
    2177133.Capture.PNG

    The value of option set should be the one in the field description.
    community.dynamics.com/.../195852

    community.dynamics.com/.../207700

  • RE: Hide statuscode in Incident

    Hello Nithya Gopinath,

    Thanks for the answer, I wanted to test this option, however I do not currently have testing environment, do you know a way to hide some of these options via javascript?

    Tanks

  • RE: Hide statuscode in Incident

    Hello Drew Nithya Gopinath,

    Thanks for the answer, I wanted to test this option, however I do not currently have testing environment, do you know a way to hide some of these options via javascript?

    Tanks

  • RE: Hide statuscode in Incident

    Hello, Drew Poggemann,

    Thanks for the answer. I want to remove using Java Script because there are already other instances created with these statuscode and I want to avoid crashes and errors in the Occurrence screen.

    Thanks

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Hide statuscode in Incident

    Hi,

    You can customize the field of the entity to remove the status-code options.

    www.microsoft.com/.../define-status-reason-transitions-for-case-management-customer-service.aspx

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: Hide statuscode in Incident

    Hi Ricardo,

    I am just wondering, I went into the Case entity (Incident) and I found the field for the statuscode.  I can update here to remove and add options.  Is there a reason you are doing through code vs just removing the option from the list of available options on the field in the entity?  

    Screen-Shot-2017_2D00_01_2D00_02-at-8.27.04-PM.png

    Hopefully this helps you solve without the code.

    Thanks,

  • RE: Hide statuscode in Incident

    Hello Alagu

    Thanks for the response, I did the test plus the statecode of Occurrence keeps turning on, I'm using CRM on Line, I do not know if this can impact the execution of the method.

    Thank you

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Hide statuscode in Incident

    HI

    try this below

    var status = Xrm.Page.getControl("statuscode");

    status.removeOption(3)

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans