Android SDK Samples - Roles Operations
//$companyInfo object is of ZCRMCompanyInfo
//call getRoles() using $companyInfo object
$companyInfo.getRoles(object : DataCallback<BulkAPIResponse, List<ZCRMRole>>
{
override fun completed(response: BulkAPIResponse, roles: List<ZCRMRole>)
{
println("${response.responseJSON}")
}
override fun failed(exception: ZCRMException)
{
println("Throws Exception : $exception")
}
})
//$companyInfo object is of ZCRMCompanyInfo
//call getRole() using $companyInfo object by passing the unique id as a parameter
//id - Id whose role is to be returned
$companyInfo.getRole(37122xxx6005, object : DataCallback<APIResponse, ZCRMRole>
{
override fun completed(response: APIResponse, role: ZCRMRole) {
println("${response.responseJSON}")
}
override fun failed(exception: ZCRMException) {
println("Throws Exception : $exception")
}
})