SharinPix Aggregate Search (Developer-Oriented)

This article, we will see how to personalize the SharinPix search when querying images from a large number of records.

The following sections demonstrate how to use the SharinPix Album to perform a personalized aggregate search to display all the images present on the Contact records related to a particular Account record. This can be done by embedding the SharinPix component inside an Iframe.

Therefore, you will need:

Apex Controller

The Apex Class controller implementation can be found in the following sections.

public String getSearchUrl() {
  loadParams = new Map<String, Object> {
    'path' => '/search?search_bar=false',
    'q' => '',
    'download' => true,
    'download_filename' => acc.Name,
    'download_filenames' => acc.Name
  };
  return clientInstance.token(loadParams);
}

Split records in groups of 20 album IDs

Build query Strings and generate tokens for each groups

Visualforce Page

The code snippet below shows the implementation of the Visualforce Page used to display the search results on a SharinPix Album:

triangle-exclamation

Last updated

Was this helpful?