Implementation Details
The LaptopMobile.DataAccessAPI.dll is deployed in GAC as part of the Laptop Mobile installation and is made available for --party integration/access. Additionally, thirdparty applications need to add a reference to System.Data.SQLite.dll, SQLite.Interop.dll, which is available in the DataAccessAPI folder in the Laptop Mobile installed directory.
Third-party applications can perform CRUD operations against the local offline database. During synchronisation, data modified through this API is synchronised and is made available in online SFDC.
Access to perform CRUD operation on database objects (tables) and fields depends on the configuration and permissions assigned to the logged in user. The user profile should have the following configuration defined/assigned for successful CRUD operation through the API:
Allow API Access property should be checked in the Other Settings tab under Mobile Configuration.
Necessary permissions for transactional objects, on which API operations are performed, should be provided in SFDC.
The database can be accessed only from the device where the Laptop Client is installed.
CRUD operations via LaptopMobile.DataAccessAPI.dll are achieved through the following function/method calls listed in the table below.
Method/Function Name
Parameters
Description
executeInsert
DARequest
Allows inserting new records into the local database.
executeUpdate
DARequest
Allows updating of existing records in the local database.
executeDelete
DARequest
Allows deleting of existing records in the local database.
executeQuery
DARequest
Allows querying data from the existing local database.
getDbObjects
DARequest
Provides the metadata at all levels for the specified object.
getDBObjectFields
DARequest
Provides the list of fields for a given object with its permissions, data type, and so on.
All the functions/methods accept one parameter, an object of DARequest type, as input.
Was this helpful?