Hi,
I have a web template with Fetchxml to retrieve records from Dynamics, i want to add dynamic conditions based on the parameters passed to that. Below is that code, i tried to add, but it is not working as expected.
Any thoughts please?
{% assign customerid = request.params['customerid'] %} {% assign addressid = request.params['addressid'] %} {% assign cacheString = request.params['cacheString'] %} {% if customerid %} {% assign conditionCustomer = " %} { { conditionCustomer } } {% endif %} {% if addressid %} {% assign conditionAddress = " %} { { conditionAddress } } {% endif %} {% fetchxml customerProperties_query %} {{ conditionAddress }} {{ conditionCustomer }} {% endfetchxml %} { "totalcount": { { customerProperties_query.results.total_record_count } }, "customerProperties" : [ {% for result in customerProperties_query.results.entities %} { "lace_customerpropertiesid" : "{{ result.lace_customerpropertiesid }}", "lace_address" : "{{ result.lace_name }}" } {% unless forloop.last %}, {% endunless %} {% endfor %} ] }