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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

on submit how to set field value in view details of CRM Portal

(0) ShareShare
ReportReport
Posted on by 135

HI

I have entity list and view details entity form in crm portal. One of the fields in the view details is a drop down with 5 values. On submit I want to change the value of the drop down to a different value and persist the same to the entity. I tried using the following but not able to save the new value. I am able to see the alert. I have the following in the entityform javascript. If I change value to a different value manually on the screen it saves on submit. When the value is 2 I would also like to make the field read only when its value is 2.

$(document).ready(function(){

$("#UpdateButton").click(function() {
alert ('Insisde function');
$('#m_productstatus').val(2);
$("#InsertButton").trigger("click");
});

})

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Irena Benja Profile Picture
    414 on at

    Hi,

    To block the field:

    var yourValue = $('select#m_productstatus option:selected').text();
    if(yourValue == "2"){
    $('select#m_productstatus').attr("disabled", true);
    }
  • Suggested answer
    oliver.rodrigues Profile Picture
    4,052 on at

    you don't need JS for that, you can use entity form metadata

    community.adxstudio.com/.../entity-form-metadata

    search for "Set Value on Save"

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans