I have a very simple HTML page that uses the following three lines of HubL.
{% set deal_query = “limit=999&myFilteringProperty=true” %}
{% set deal_properties = " id, dealname, myFilteringProperty"%}
{% set filteredDealObjects = crm_objects(“deal”, deal_query, deal_properties) %}
If I print the output of the filteredDealObjects I can see the deals I expect to be returned are in fact returned and I can use this information to create an HTML select element with all the deals as options.
Once you select the deal you want to work with you fill in and submit a form there is some javascript that will update myFilteringProperty via the Hubspot API to be false. I won’t post the frontend/backend javascript as I can manually check these are working as expected by opening the deal in the CRM and checking the deal property. I can see myFilteringProperty is definetly set to false for the deal I have just submitted.
If I then refresh the page, the same HubL will return all the sames deals as before including my deal which now has myFilteringProperty == false. The only way I can ever get the the list of deals that are returned to update is by making a change to the HTML code and uploading it via the HS CLI tool or via the design tools.
An obvious workaround for this would be that I just use javascript to make the request for the deal objects to build the select element in the first place but am I crazy in thinking that this is what HubL is for?