jsnosal - Friday, January 24, 2014 9:42 AM:
We are currently going through a mass parts change. We have a method that triggers OnBeforeUpdate. We would like to do this before the parts are released. Is there a way to trigger this method action inside of AML Studio or a way to trigger a specific method? Thank you for your help.
Eric Domke - Wednesday, February 12, 2014 2:37 PM:
Yes, to call a specific method, simply set the action name equal to the name of the method. That is, if your OnBeforeUpdate method is call ABC and you want to call it for a part with ID 123, your AML would look like:
<Item type="Part" id="123" action="ABC">
<!-- your item data here as required by your method -->
</Item>
However, your OnBeforeUpdate method likely does not commit changes to the database, but just modifies the context item, so this might not be useful. To edit the item in AML (which will trigger the OnBeforeUpdate event if you have specified it as a server event on the item type), set the action to "update" (if the part is already locked) or "edit" (to lock, update, and unlock the item).