This method is useful to create custom overridden Load() or Load() derivates (LoadByUserName() for example) methods for business objects that retrieve data in other ways than by specification of a primary key.
To create a customized Load() derivative method in your business object you could do:
FUNCTION LoadByUserName PARAMETERS pcUsername RETURN this.LoadBase("username=?pcUserName")
Then in code:
loUser = CreateObject("busUser") IF !loUser.LoadByUserName("rstrahl") RETURN ENDIF ? loUser.oData.Username
You can also use LoadBase() directly for custom scenarios where you would like to retrieve entities with custom field lists for example, when returning results back to a client application via serialized AJAX JSON results where less data on the wire is preferrable.
o.load(lcFilter,lcFieldList)
lcFieldList
Optional comma delimited list of fields that are to be loaded in the entity. If not provided the default set in this.cFieldList (typically *) is used.
Last Updated: 07/30/09 |
© West Wind Technologies, 1996-2010