How can I retrieve specific properties for CMS objects?

In my situation, I need to display pipeline labels as selectable dropdown values. I’m interested in examining property definitions within the CMS module. While they offer the crm_object_definition function in HubL, it doesn’t retrieve the options values for enums.

{% set pipelineProperty = crm_property_definition('TICKET', 'hs_pipeline_stage') %}

t returns a value similar to the following definition.

{portalId=XXXX, name=hs_pipeline_stage, label=Ticket status, type=enumeration, fieldType=select, description=The pipeline stage that contains this ticket, groupName=ticketinformation, formField=true, displayOrder=-1, options=[], readOnlyValue=false, readOnlyDefinition=true, hidden=false, mutableDefinitionNotDeletable=false, externalOptions=true, hubspotDefined=true, updatedAt=1692043766679, createdAt=1565059381538, externalOptionsReferenceType=PIPELINE_STAGE, allowedObjectTypes=[], dataSensitivity=none, sensitiveDataCategories=[]}

Is there a method available to access the options of a property?

Hi @SRajesh0

Since the crm_property_definition HubL function doesn’t directly provide the option values for enumeration properties like pipeline stages.

Try to utilize workflows. That triggers on a specific event, such as contact creation, you can employ the Get Lifecycle Stage Labels action to retrieve the labels for all stages in a specific pipeline.

This action allows you to store these labels in custom properties on the contact object.

Afterwards, in your CMS template, you can leverage HubL to access these custom properties and populate the dropdown options with the desired pipeline labels.

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

Thanks @Humashankar , Yep, I did your solutions. It’s working.