Once you have a GE Object, the most common thing you'll want to do with it is access its fields.
Note |
---|
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. |
...
Via properties:
Code Block language js title Field Access Via Properties linenumbers true // Getting a field value var name = personGE.FirstLast; // Setting a field value personGE.LastName = "Test";
Via accessor methods:
Code Block language js title Field Access linenumbers true // Getting a field value var company = personGE.get("CompanyName"); // Setting a field value personGE.set("Department", "Testing");
...
Tip | ||
---|---|---|
| ||
You can get and set the value of an embedded field in exactly the same way as any other field. |
Tip | ||
---|---|---|
| ||
You can get the value of a virtual field in exactly the same way as any other field. You can also set it in the same ways, but unless the virtual field is one that has been linked to a field on an embedded object, the value you set will of course not propagate to the database when the GE Object is saved. |
Info | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
Using the property access is generally advised because it's shorter and clearer. The advantage of using get() or set() is that you don't have to get the capitalization of the field name right; it's corrected for you.
|
...