Last active
August 21, 2018 20:00
-
-
Save cgillis-aras/ee2a19fd952377fd94685f62bedf3308 to your computer and use it in GitHub Desktop.
Example code that will cause an infinite loop when trying to create a Document during an onBeforeAdd event of the Document ItemType
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WARNING: This code will cause an infinite loop when run from an onBeforeAdd event on the Document ItemType. | |
// It is meant to serve as an example only. | |
Innovator inn = this.getInnovator(); | |
Item newDoc = inn.newItem("Document", "add"); | |
newDoc.setProperty("item_number", this.getProperty("item_number") + " - Design"); | |
newDoc.setProperty("name", this.getProperty("name") + "'s Sibling"); | |
newDoc = newDoc.apply(); | |
return this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment