Forum Discussion
hi ,Gopikrishnan
First of all, thank you for your reply!
I tested this code, but I get the error message "parent.thisItem is undefined" or "menuFrame.populateAccessMenu is not a function".
Later I changed the
aras.uiReShowItem(parent.thisItem.getID(), parent.thisItem.getID());
changed to
"aras.uiReShowItem(document.thisItem.getProperty("id"), document.thisItem.getProperty("id"));
There is still the error message "menuFrame.populateAccessMenu is not a function"...
And it also seems to cause infinite loops when placed under this event
Hi Mavis
Can you try below steps
Remove all the methods and event added as per my previous suggestion.
Step 1: Create new C# Server Method and add below code
Innovator inn = this.getInnovator();
int currentValue = Int32.Parse(this.getProperty("score_1"));
Item relItm = inn.newItem("Performance_SelfScore", "get");
relItm.setProperty("source_id", this.getID());
relItm.setAttribute("select", "self_score");
relItm = relItm.apply();
int sum_self_score = 0;
for (int i = 0; i < relItm.getItemCount(); i++)
{
sum_self_score = sum_self_score + Int32.Parse(relItm.getItemByIndex(i).getProperty("self_score","0"));
}
if(currentValue != sum_self_score)
{
Item updateItem = inn.newItem("Performance_Self_Evaluation", "edit");
updateItem.setAttribute("id", this.getID());
updateItem.setProperty("score_1", sum_self_score.ToString());
updateItem = updateItem.apply();
}
return this;
Add this method to Performance_Self_Evaluation item type server Events OnAfterUpdate event
Thank You
Gopikrishnan R