Hi ,
I am trying to edit an ItemType "EDM StructureDocument" which is derived from a polyItem using a server event "onAfterAdd" .
with an implemented C# method :
/**
* History
* Version Date Name Comment
* 1.1 09-September-2019 Hamdi Kendil Generate the ID for the current EDM Structure Document using the Server Event onAfterAdd
* Story: EDM-5: Create a new Document
* Purpose: Generate the EDM Structure Document ID
* Usage: EDM Structure Document
* Event: onAfterAdd
*
*/
System.Diagnostics.Debugger.Launch();
System.Diagnostics.Debugger.Break();
//Obtain the Innovator instance from the Context Item
Innovator inn = this.getInnovator();
//long MaxItemNumber = 9999999999 ;
//Get the ItemList of EDM StructureDocument ItemType
Item results = inn.newItem("EDM StructureDocument", "get");
results = results.apply();
//Calculate the number of the EDM Part instances
long count = results.getItemCount();
if(count <= MaxItemNumber){
//Get the hexa id of the current EDM Part item
string id = "'" + this.getID() + "'";
//Compute a new id of the current EDM Part item
string edmId = "";
string itemNumber = count.ToString();
int len = itemNumber.Length;
int maxIndex = 10 - len;
for (var index = 0; index < maxIndex; index++) {
edmId += "0";
}
edmId += itemNumber;
//Set the current item id with the determined value
Item myItem = inn.newItem("EDM StructureDocument", "edit");
string request = "id=" + id;
myItem.setAttribute("where", request);
myItem.setProperty("edm_doku_id", edmId);
return myItem.apply();
} else {
return inn.newError("Error Creating a new EDM Document , the Number of Documents is Maximal");
}
When I try to save the new created Item, it gives me following error :
There is no tag <Item> in response.
Can anyone explain me the cause of this error , or provide me a document that can help me solving the issue such as the Aras exceptions details .
Please .
Thanks in advance