Server Method working when given a GUID, but not when using this

Hello,

When I run this server method from the method itself and use a GUID to get the Item I want to update the method works fine, but when I change it from a GUID to = this; and run it from the  Item Type on the server events "OnBeforeUpdate" it crashes the whole server and the server has to be restarted.

// Item KSAAsses = inn.getItemById("smc_KSA_Assessment","2956D6CFB25949D39985FF112F2395FA");
Item KSAAsses = this;

Has anyone ever ran into something similar?

I can post more code if needed.

Thank you for your help!

Parents Reply Children