Hello,
I believe the issue you're running into is that the context item from onAfterGet server event is the collection of items returned from the get query. The
not a single item error is being thrown on
string masterpart = this.getProperty("item_number"); because the
getProperty function cannot be called on a collection.
The simplest way to work around this issue would be to wrap the bulk of your code in a for loop and call it for each individual item in the collection like so.
for (int i = 0, length = this.getItemCount(); i < length; i++)
{
Item currItem = this.getItemByIndex(i); // Select one item at a
string masterpart = currItem.getProperty("item_number");
// Put the rest of your code in this loop too
}
Chris
Christopher Gillis
Aras Labs Software Engineer