I am trying to edit the State of a Part with a specific generation, "1".
The output of the following is just "<Result/>"
Innovator innovator = this.getInnovator(); string configId = this.getProperty("config_id"); Item itm = this.newItem("Part", "edit"); itm.setAttribute("where","part.item_number='11-1-1D123' AND part.generation='1'"); itm.setProperty("state","Released"); return itm.apply();
However, if I use "setProperty" with "get" in separate lines I get the correct output. However, I can't use "setProperty" to filter with "edit" because it sets a new value for the property. Below is the code:
Innovator innovator = this.getInnovator(); string configId = this.getProperty("config_id"); Item itm = this.newItem("Part", "get"); itm.setAttribute("select", "id,generation,major_rev,state,item_number"); itm.setProperty("generation", "1"); itm.setProperty("item_number", "11-1-1D123"); return itm.apply();