hkhan
5 years agoIdeator I
Not a single item
I wrote down the following to get data from a relationship and insert it in an item type but unfortunately im having the following error
I dont see an issue with my logic if someone can take a look...
Can you please help me to understand relDoc.setProperty("vsy_title",title); ...?
Kindly ignore that I forgot to comment that out
Hi,
Item ecrtask = this.newItem("ECR Task", "get");
ecrtask.setProperty("source_id", this.getID());
ecrtask = ecrtask.apply();
int countOfECR=ecrtask.getItemCount();
return this.getInnovator().newError(countOfECR.ToString()) ///Try to get Count and see if it is returning Zero records or more
for(int i=0; i < ecrtask.getItemCount(); i++)
{
Item relDoc = ecrtask.getItemByIndex(i).getRelatedItem();
string title = ecrtask.getProperty("vsy_title","");
string relDocid = relDoc.getProperty("id","");
Item vsyTask=this.getInnovator().newItem("VSY_Task","edit");
vsyTask.setAttribute("where","[VSY_Task].id='"+relDocid+"'");
vsyTask.setProperty("vsy_title",title);
vsyTask=vsyTask.apply();
}
unfortunately it is giving me same error