Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

removeOption() is not working only for status reason option set...!!!

(0) ShareShare
ReportReport
Posted on by 2

Hi ,

When i was trying to remove or add value to the status reason option set using java script. it is showing the following error "

TypeError: Object doesn't support property or method 'removeOption'
at hideConfirmedStatus (propertyxrmdemo.crm4.dynamics.com/.../md_HideReceiptSections)
at eval code (eval code:1:1)
at RunHandlerInternal (propertyxrmdemo.crm4.dynamics.com/.../ClientApiWrapper.aspx:142:1)
at RunHandlers (propertyxrmdemo.crm4.dynamics.com/.../ClientApiWrapper.aspx:101:1)
at OnScriptTagLoaded (propertyxrmdemo.crm4.dynamics.com/.../ClientApiWrapper.aspx:215:1)
at Anonymous function (propertyxrmdemo.crm4.dynamics.com/.../ClientApiWrapper.aspx:186:1)"

this error only with the CRM 2015 update 1 , it is working fine for previous versions. Can any one help me..?? 

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Abhiram,

    You got any solution for new rendering?

    Thanks,

    Punitha

  • Indra Sheker Profile Picture
    69 on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Experts,

    Is there any way that we can achieve the above issue using Status Reason Translations in CRM 2016

    7752.Capture.PNG

    Please suggest

    Indra

  • Community Member Profile Picture
    on at
    RE: removeOption() is not working only for status reason option set...!!!

    The short term way to overcome this is to turn back on the legacy engine in the Settings area (Navigate to Settings -> Administration -> System Settings -> General). The long term solution would be to use a web resource instead.

    1055.apps.png

    Do above configuration its work for me. 

    Please mark as answer if it will work for you.

  • Abhiram Thulasi Profile Picture
    2 on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Patnj ,

    I didn't get any solution for this issue. we were using old rendering engine till now. The remove option will only work if we are enabling the old rendering engine.

    Thanks,

    Abhiram

  • Patnj Profile Picture
    on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Abhiram,

    Did you find a solution ? We are experiencing the same issue in CRM 2016.

    Many thanks

    Neel..

  • Abhiram Thulasi Profile Picture
    2 on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Arpita Sani,

    Thanks for your reply. That is working fine with the old rendering engine, but I really want to make it working with the new rendering...please let me know if there is any known solution for this....

  • Arpita Saini Profile Picture
    on at
    RE: removeOption() is not working only for status reason option set...!!!

    Try disabling turbo forms and see. Goto settings --> system settings--> general tab --> last option for new form rendering engine

  • Abhiram Thulasi Profile Picture
    2 on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi  Sande,

    Thanks for your reply. Actually I am not trying to hide any section or tab from the form. I was trying to remove an option set value from the "Status Reason " option set. Below I attached the code which having the issue. It was working properly before. When I applay CRM 2015 update 1 into my organization it showing the error message.

    Xrm.Page.getControl("statuscode").removeOption(899230002);

  • Bas van de Sande Profile Picture
    4,383 on at
    RE: removeOption() is not working only for status reason option set...!!!

    Hi Abhiram,

    did you check if your object was of the correct type? As far as I can see from the naming in the error message, you are trying to hide some sections on the form (correct?).  If this is the case, can you verify if the name of the tab and section correcsponds with the name of the tab and section in your script.

    Can you share some code with us?

    Bas

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans