Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Optionset is expanded when i try to set the Value in the Field

$
0
0

Hi All,

I am trying to set the Optionset value by passing the Value to it.

The below function check the Form Lable and accordingly set the Facility Type field. When i run the code, Same field in the BPF is set but the field in the form is not set and is expanded. When i click anywhere outside the form, the field sets.

Function :

function setFacilityTypeAfterToggle(executionContext) {
var formContext = executionContext.getFormContext();
var formLabel = formContext.ui.formSelector.getCurrentItem().getLabel();
if (formLabel == "New Facility Set-up") {
formContext.getAttribute("test_changetype").setValue(915920000);
}
if (formLabel == "Material Change") {
formContext.getAttribute("test_changetype").setValue(915920001);
}
if (formLabel == "Non Material Change") {
formContext.getAttribute("test_changetype").setValue(915920002);
}
}

Screenshot:


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images