$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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

 

  1. 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 Object
    personGE.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.
    	}
    });

Filter by label

There are no items with the selected labels at this time.

  • No labels