Android SDK Samples - Profiles Operations

Get All Profiles
          
          
//$companyInfo object is of ZCRMCompanyInfo

//call getProfiles() using $companyInfo object

$companyInfo.getProfiles(object : DataCallback<BulkAPIResponse, List<ZCRMProfile>>
    {
        override fun completed(response: BulkAPIResponse, profiles: List<ZCRMProfile>)
        {
            println("${response.responseJSON}")
        }

        override fun failed(exception: ZCRMException)
        {
            println("Throws Exception: $exception")
        }

    })
 
Get a Profile
          
          
//$companyInfo object is of ZCRMCompanyInfo

//call getProfile() using $companyInfo object by passing the unique id as a parameter

//id - Id whose profile is to be returned

$companyInfo.getProfile(3712xxx6014, object : DataCallback<APIResponse, ZCRMProfile>
    {
        override fun completed(response: APIResponse, profile: ZCRMProfile)
        {
            println("${response.responseJSON}")
        }

        override fun failed(exception: ZCRMException)
        {
            println("Throws Exception : $exception")
        }
    })