return inn.newError("My warning message");to display a dialog with to the user. Chris
On Completefield. I added this code and was able to improve the "refresh" behaviour:
var inn = this.getInnovator(); var parentItm = this.getType(); var parentID = this.getID(); // Get the config_id var item = inn.newItem(parentItm, "get"); item.setID(parentID); item.setAttribute("select","config_id"); item = item.apply(); var configID = item.getProperty("config_id"); // get the most recent part with config_id var currentItm = inn.newItem(parentItm, "get"); currentItm.setProperty("config_id", configID); currentItm.setProperty("is_current", "1"); currentItm = currentItm.apply(); // show new item in frame of previous item aras.uiReShowItem(parentID,currentItm.getID(),'view','tab view');
aras.uiShowItem("Part", id);- just show an item 3.
aras.uiReShowItem(parentID,newID,'view','tab view');- reshow item 4.
aras.uiReShowItemEx(parentID,doc.newItem.node);- similar to uiReShowItem 5.
aras.clearClientMetadataCache();I have seen this often in other samples here in the Forum, but I prefer the other options. For updating the grid there are other options avaiable (runSearch, updateRow). You can find them often in the code of CUI elements. Maybe this one is also option for you. This is a very reduced breakout from an Action I use in the BOM Relationship. It updates the Form after the job were done.
From my current POV, the above sample is not as reliable as I expected it to be and still requires some further testing. So maybe this one is a better option. Angela
var bomID = this.getID(); // get id of BOM relationship var body = "<bom_>" + bomID + "</bom_>"; var result = aras.applyMethod("My server Method",body); // do some server side stuff parent.onRefresh(); // Refresh Part return null;