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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

#3
James White Profile Picture

James White 19

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans