Announcements
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
Here is the same question, check if it helps.
https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/293326/dynamics-365-portal-hide-field-based-on-status-code-using-javascript?pifragment-97030=1
Regards,
Hi partner,
Firstly, you need ensure statuscode(status reason) Is on the form.
Then add following code to ‘Addition settings’ tab in entity form.
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
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 "".
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.
Alex
$("#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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 51 Super User 2026 Season 1
Muhammad Shahzad Sh... 51 Most Valuable Professional
Nagaraju_Matta 50