Dynamic Drop Down List in Relationship Property

Hi Team

I have below set of code to set the dynamic drop down list in relationship property. It is working in ARAS 12 SP2 version but it is not working in ARAS 12 SP18 version. Can you please let me know what am I missing or what is changed between this two versions

gridApplet.cells(relationshipID,targetColumnIndex).setEditType(2); // This line is through below error
var cell = gridApplet.cells(relationshipID,colNumber);
gridApplet.columns_Experimental.set( cell.grid_Experimental.layout.cells[cell.indexColumn_Experimental].field, "comboList", listArray, valueArray);

Error Message

oneditstart handler failed with message: TypeError: Cannot read properties of undefined (reading 'field')

Parents
  • Do you have an official feedback from support?

    "TypeError" messages are super typical for 12SP18. Have seen similar error messages many times. In the newer Innovator versions Aras has real trouble with federated/poly-like properties which are filled on-demand by code. Big fun! 

    Possible solution: Remove the a target property of your Method in the ItemType and then add it again
    If you are an subscriber: Ask for SI-031239 for a possible codetree solution, but it didn´t resolve the root cause. But it´s helpful when other people report similar issues.

    In addition: Where did you find "setEditType" thing? Is your code based on a community project? According to my collection of useful stuff it´s outdated since 10SP4. Not sure, but this is a replacement I found:

    //Since 10 SP4 : Change the way to bind a comboBox on a cell
    var field = gridApplet.columns_Experimental.get(colNumber, "name");
    gridApplet.columns_Experimental.set(field, "editType", "FilterComboBox");
    gridApplet.columns_Experimental.set(field, "comboList", listOfValues, listOfLabels);

Reply
  • Do you have an official feedback from support?

    "TypeError" messages are super typical for 12SP18. Have seen similar error messages many times. In the newer Innovator versions Aras has real trouble with federated/poly-like properties which are filled on-demand by code. Big fun! 

    Possible solution: Remove the a target property of your Method in the ItemType and then add it again
    If you are an subscriber: Ask for SI-031239 for a possible codetree solution, but it didn´t resolve the root cause. But it´s helpful when other people report similar issues.

    In addition: Where did you find "setEditType" thing? Is your code based on a community project? According to my collection of useful stuff it´s outdated since 10SP4. Not sure, but this is a replacement I found:

    //Since 10 SP4 : Change the way to bind a comboBox on a cell
    var field = gridApplet.columns_Experimental.get(colNumber, "name");
    gridApplet.columns_Experimental.set(field, "editType", "FilterComboBox");
    gridApplet.columns_Experimental.set(field, "comboList", listOfValues, listOfLabels);

Children