Notifications
Announcements
No record found.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 55 Super User 2025 Season 2
Daniyal Khaleel 27 Most Valuable Professional
Soundari 15