SaveDraft method: Tree class
Syntax
SaveDraft()
Description
The SaveDraft method writes any changes to the tree executing the method to the database. However, it does not perform audits. Trees that are saved in this way are marked as "draft" and will not be valid (that is, cannot be used with other PeopleTools) until the tree audit is passed.
The SaveDraft method can be used only on an open tree, not on a closed tree. This means you must have opened the tree with the Open method before you can save it.
The tree object remains open after executing SaveDraft. You must execute the Close method on the object before it is closed and the memory freed.
Note:
If you’re calling the Tree API from an Application Engine program, the data won’t actually be committed to the database until the Application Engine program performs a Commit.
Parameters
None.
Returns
This method returns an integer: 0 if saved successfully, a number greater than 0 otherwise.