Hello All,
I have created an itemtype "ItemOne" with Form that conyain a field "fieldTest".
What i want to do is filling the field when the ticket is locked.
I have created a form event method and assign it to the form with event onFormPopulated:
var lock = document.thisItem.getProperty("locked_by_id", "");
if (lock =='' ){
var field =getFieldByName("fieldTest");
field.getElementsByTagName("input")[0].disabled = false;
field.getElementsByTagName("input")[0].readOnly = false;
}
else {
var fields =getFieldByName("fieldTest");
fields.getElementsByTagName("input")[0].disabled = true;
}
}
The method above allow to fill the fieldTest if the item is locked (value of locked-by-id is emty) otherwise the fiield wiill be disabled.
So when the item is locked, we can fill the fieldTest but the button save is disabled and when i unlock the item and save , Aras considers that the field is not filled, saves the item and leaves the fieldTest empty.
Is there any way please on how to achieve this ?