Save A GE Object
When you've made changes to a GE Object, you probably want to persist them to the database.
This How-To assumes you have already gone through the steps in Get A GE Object and are coding inside of a callback to Aptify.framework.genericEntity.getEntityObject(). It continues that example, assuming you have already defined personGE.
Step-by-step guide
Save the GE Object using its saveRecord() method. This takes an object with the callback function as a property. The callback function gets an object with success status and any errors passed to it. Make sure you publish any exceptions that occur!
Saving A GE ObjectpersonGE.saveRecord({ callBack: function (saveResult) { if (!saveResult || !Aptify.framework.utility.parseBool(saveResult.success)) { // Changes were not successfully saved to the database. // Publish any error information given to us if (saveResult) { Aptify.framework.exceptionManager.publish(saveResult.errors); } else { Aptify.framework.exceptionManager.publish("No result was passed to saveRecord's callBack."); } } // Else, the changes were successfully saved to the database. } });
Related articles
Copyright © 2014-2017 Aptify - Confidential and Proprietary