Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

fetchPersonalizations(listID)

Updated on July 20, 2021

Retrieves the list of personalization instances for a list component and returns the list as a Promise.

Note: The API’s response also contains a defaultPersonalization flag which contains the default personalization ID. If the default personalization ID does not exist, the defaultPersonalization flag is empty.

Returns

The list of personalization instances as a Promise.

Parameters

NameTypeDescriptionRequired
listIDstringA unique ID referencing a list component.
Note: The length of the ID should be limited to 32 characters.

Usage example

In this example, the API retrieves the list of personalization instances for the list component with ID 443533r555.

const listId = "443533r555";
PCore.getPersonalizationUtils("443533r555").fetchPersonalizations();

The response structure is as shown below:

{
   defaultPersonalization : "L_234322",
   allPersonalizations : [
     {
        "name" : "Open bugs",
        "personalizationId" : "L_345643",
        "personalizationState" : "{ filter : 'pyStatusWork = Open'}"
     },
     {
        "name" : "Resolved bugs",
        "personalizationId" : "L_234322",
        "personalizationState" : "{ filter : 'pyStatusWork STARTS_WITH Resolved'}"
     }
   ]
}
  • Previous topic deletePersonalization(listID, personalizationID)
  • Next topic updatePersonalization(listID, personalizationID, personalizedState)

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us