Forum Discussion

Kyle_V_'s avatar
Kyle_V_
Ideator I
3 years ago
Solved

How can I trigger the classification to update and change forms from a different property?

Hi Aras Community, I have a use case where my classification is technically controlling two things. What type of workflow they are on and what kind of form they see with the ability to switch the dif...
  • Kyle_V_'s avatar
    Kyle_V_
    3 years ago

    Hey AngelaIp I ended up getting with Aras Support and they recommended the following code addition that ended up working.

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:b1936a38-6377-4896-8f83-77804ad9e8f6:type=javascript&text=var%20inn%20%3D%20top.aras.newIOMInnovator%28%29%3B%0D%0Avar%20formtype%20%3D%20document.all%28%22form_type%22%29.value%3B%0D%0Avar%20worktype%20%3D%20document.all%28%22workflow_purpose%22%29.value%3B%0D%0Avar%20classification%20%3D%20%22%22%3B%0D%0A%0D%0Aswitch%28worktype%29%7B%0D%0A%20%20%20%20case%20%22New%20Work%22%3A%0D%0A%20%20%20%20%20%20%20%20if%28formtype%20%3D%20%22form1%22%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20classification%20%3D%20%22form1%2FCreate%20New%22%3B%0D%0A%20%20%20%20%20%20%20%20%7Delse%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20classification%20%3D%20formtype%2B%22%2F%22%2Bworktype%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20break%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20case%20%22Other%20Work%22%3A%0D%0A%20%20%20%20%20%20%20%20if%28formtype%20%3D%20%22form2%22%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20classification%20%3D%20%22form2%2FOther%20Work%22%3B%0D%0A%20%20%20%20%20%20%20%20%7Delse%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20classification%20%3D%20formtype%2B%22%2F%22%2Bworktype%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20break%3B%0D%0A%7D%0D%0A%0D%0Awindow.handleItemChange%28%22classification%22%2Cclassification%29%3B%0D%0Awindow.handleItemChange%28%22form_type%22%2C%20formtype%29%3B%0D%0A%0D%0A%2F%2Asupport%20addition%2A%2F%0D%0Aparent.onRefresh%28%29%3B%0D%0A%2F%2Asupport%20addition%2A%2F%0D%0Areturn%20this%3B]