MobileCRM.Services.AddressBookService.getService - Resconet/JSBridge GitHub Wiki
[v9.1] Gets an instance of AddressBookService object.
Arguments
Argument | Type | Description |
---|---|---|
errorCallback | function(errorMsg) | The errorCallback which is called in case of error. |
scope | Object | The scope for callbacks. |
This example demonstrates how to receive information about record from address book.
function onAddressBookService() {
var addressbook = MobileCRM.Services.AddressBookService.getService(MobileCRM.bridge.alert, null);
addressbook.getContact("1", processContactRecord, MobileCRM.bridge.alert, null);
}
function processContactRecord(contactRecord) {
/// <param name='contactRecord' type='MobileCRM.Services.AddressBookService.AddressBookRecord'/>
var jobTitle = contactRecord.jobTitle;
var firstName = contactRecord.firstName;
var lastName = contactRecord.lastName;
MobileCRM.bridge.alert("Contact : " + jobTitle + " " + lastName + " " + firstName);
}