web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Get statuscode value in Portal Dynamics

(1) ShareShare
ReportReport
Posted on by 44

Hi,

I would like to get  the statuscode of an entity form to hide/show a field using Javascript.

I tried $(#fieldname).val() in a function but it is returning a blank.

How can I achieve that ?

Tell me if you need more details

I have the same question (0)
  • erhan.keskin Profile Picture
    2,253 on at
  • Verified answer
    Community Member Profile Picture
    on at

    Hi partner,

    Firstly, you need ensure statuscode(status reason) Is on the form.

    Then add following code to ‘Addition settings’ tab in entity form.

    pastedimage1601457965064v1.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Alex519 Profile Picture
    44 on at

    Hi Erhan,

    I checked your link and I used the same syntax to get status code, however it didn't work for and it is returning "".

    Regards,

  • Alex519 Profile Picture
    44 on at

    Hi Leah,

    I added "reason status" (read only) on the CRM form but it is still not working for me. It is returning "" .

    Besides, I forgot to mention I added code in the webpage that contains entity form. 

    Regards,

    Alex

  • Suggested answer
    James Reinhardt Profile Picture
    222 on at
    I know its a few years too late, but you need to use:
    $("#statuscode_EntityStatus").val(); 
     
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans