Body node is not found

rated by 0 users
This post has 2 Replies | 2 Followers

Top 50 Contributor
Posts 26
Points 370
Pravin_Nalkande Posted: Fri, Feb 3 2012 12:16 AM

Dear  All,

I am getting a problem when I executing a method it gives me error like 'Body node is not found'

Please tell me solution where is the problem .

Thanks,

Pravin

 

 

 

 

  • | Post Points: 20
Top 10 Contributor
Posts 104
Points 1,395

Can You provide us with the method?

Yoann

  • | Post Points: 20
Top 50 Contributor
Posts 26
Points 370

Hi Yoann,

I have item type name as Enterprise Feature ,on server event (onAdd)of this item type I have put the method name as getSourceAndTargetItemType

code as below:

-----------------------------------------------------------------------

Innovator inn= this.getInnovator();
string SourceType_ID=this.getProperty("SourceTypeID");
string typeName=this.getProperty("Type");
string newTypeName=typeName.Replace("'", "");

Item getRuleFunction=this.newItem(newTypeName,"get");
//getRuleFunction.setProperty("id",SourceType_ID);
Item sourceItem=getRuleFunction.apply();


//string getItem ="<AML><Item type='sg_ruleFunction' action='get'><id>'"+this.getProperty("rule_id")+"'</id></Item></AML>";;
//Item sourceItem=inn.applyAML(getItem);

Item targetItem = inn.applyMethod("sg_createItems","<ItemType>ae_Sprint Task</ItemType>");

string targetItemAML="<AML><Item type='"+targetItem.getType()+"' action='get'><id>"+targetItem.getProperty("id")+"</id></Item></AML>";
string sourceItemAML="<AML><Item type='"+sourceItem.getType()+"' action='get'><id>"+sourceItem.getProperty("id")+"</id></Item></AML>";

targetItemAML=HttpUtility.HtmlEncode(targetItemAML);
sourceItemAML=HttpUtility.HtmlEncode(sourceItemAML);

Item mappedItemResult=inn.applyMethod("sg_copyProperties",String.Format("<TargetItem>"+targetItemAML+"</TargetItem><SourceItem>"+sourceItemAML+"</SourceItem>"));
//return inn.newError(mappedItemResult.ToString());
if(targetItem.isLocked()==1)
{
 targetItem.unlockItem();
}
return this;

--------------------------------------------

 

Please suggest me solution for this.Its a server event problem or method code problem.

Cheers,

Pravin

  • | Post Points: 5
Page 1 of 1 (3 items) | RSS