Place a key word to search

Wednesday, July 18, 2018

Question.How to set option set value by default.

Ans. For example we have the employee filed as option set and in that we the values as
1)Contract
2)Temporary

so by default we need to fill the field as Contract so for this we have couple of ways by using
javascript we can write the code as follows :

function countrycode()
    {
        var country = Xrm.Page.data.entity.attributes.get("sample_countryname");
        country.setValue("727000000");// here the 727000000 will be the option set value while we creating the option set we will have this.

    }

Refer this for further:

No comments:

Post a Comment