Sandy - Thursday, June 30, 2011 2:13 PM:
Hi all,
I have created an Item type called Scheduling and created a property called ActivityID.
I see that when ever an item has been Created an entry is made to the Activity Table for each Work Flow element.
My Requirement here is that when that entry is made into the Activity table i need to insert an entry into my Scheduling table. For doing this i have written this method which i have given on the onAfterAdd for Activity table.
Item itm =this.newItem("SCHEDULING","add");
itm.setProperty("ACTIVITYID",id);
return this;
Brian - Friday, July 1, 2011 6:52 AM:
Hi Sandy,
It looks basically ok. Have you tested the Result item? Is it returning what you would expect?
Have you tested the "id" from the this.getID() to ensure that you are getting what you think you should be?
You could try hard coding an Id just for testing and triggering the method via the "run server method" action and return the "result" item to see that it is behaving the way you expect. The other thing is of course to debug the method.
Hope this helps,
Brian.