aras.getIdentityList();
to get a comma separated list of IDs of the Identities the user belongs togetFieldByName("YOUR_FIELD_NAME").getElementsByTagName("input")[0].setAttribute("disabled", "");
.
Chris
var identityList = aras.getIdentityList();
if (!identityList.includes("REPLACE THIS WITH THE ID OF PLM ADMINISTRATOR"))
{
getFieldByName("name").getElementsByTagName("input")[0].setAttribute("disabled", ""); // <-- The disabled attribute does not need a value to take effect.
}
else
{
// We don't want to do anything in this case. If we enable the field, it will be enabled even the item is locked.
}
You will need to update the line in the If statement to include the ID of the PLM Administrator Identity in your environment. You can find this ID by right-clicking on the item and selecting Properties. You can then click the Copy ID button to get the ID.
Chris
vField1.getElementsByTagName("input")[0].setAttribute("disabled", "");
.
Chris