When developing a mobile solution using the Sage Mobile platform there are times in code where you will need to load up a business object to do some action.

Looking at the BusinessObject type displays the getBusinessObject method passing in 2 strings. My expectation is to provide the table/business object entity name and the primary key and a populated business object would be returned.

[Added] Getting a answer back on the NG the getBusinesObject provides the capability to ‘Create’ a business object of a table type. You pass in the business object/table name, and a key value and a business object entity is returned.

To successfully load a business object you should use the BusinessHelper.loadByPrimaryKey method that will return the business object and if not found a newed instance.

BusinessHelper.loadByPrimaryKey(<businessobject/tablename>, <keyvalue>, (bool) new)

Leave a Reply