Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Multiple instances of the same field on the form- set one of them to Business required

$
0
0

Hi ,

I have multiple instances of the same field on the form on different sections. I want to set the requirement level and visibility of field on only one of the form. Is it possible to do it by taking the tab name and section name. I am currently trying to use the below code which is throwing error.

function SetRequirementOfFieldArrayBasedOnPosition(fieldArray) {
    
    for (var i = 0; i < fieldArray.length; i++) {
        var getSection = Xrm.Page.ui.tabs.get("tab_8").sections.get("tab_8_section_2");
        getSection.controls.get(fieldArray[i]).setRequiredLevel("required");
    }
}

Any help on this is appreciated.



Kruthi Hegde


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>