Forum Discussion
2 Replies
- SunilReddyCreator II
Hello Sathish, If I understand your query properly, Passing the input value for your server method through API right, here is the sample
I have a method called "addPart" with the below code
Innovator inn=this.getInnovator();
string itemnumber=this.getProperty("item_number");
Item partItem=inn.newItem("Part","add");
partItem.setProperty("item_number",itemnumber);
Item result=partItem.apply();return this;
and API call is
" your server url/ server/ odata/ method.addPart"
body for the above call is
{
"@odata.type":"your server url/data/$metadata#Part",
"item_number" : "EasePLM_Sunny_009"
}Reading Itemnumber from the call and passing that to above method
- SathishCreator I
Hello Sunil,
Thanks for your answer. However, I would like to know the equivalent of Attributes. this.setAttribute() and this.getAttribute() instead of Property.