Hello Folks,
Requirement: When the user types in the "id number" on a web page and hit the search button. Then I need to retrieve the associated single record from the entities with few attributes and display it on the different web page at various places.
Below is the design of the requirement

Here is my attempt on Fetch XML:
{% fetchxml get_siteID_details %}
<fetch version="1.0" output-format="xml-platform" mapping="logical" top="1">
<entity name="cra0d_sm_site">
<attribute name="cra0d_sitename" />
<attribute name="cra0d_sm_sitemasterid" />
<attribute name="cra0d_contract" />
<attribute name="cra0d_financialyear" />
<attribute name="cra0d_raw_financialyear" />
<attribute name="cra0d_raw_contractname" />
<attribute name="cra0d_sitemasterid" />
<filter>
<condition attribute="cra0d_sm_sitemasterid" operator="eq" value="{{request.params['SiteMasterID']}}" />
</filter>
<order attribute="cra0d_sitemasterid" descending="false" />
<attribute name="cra0d_comments" />
</entity>
</fetch>
{% endfetchxml %}
{% if siteid_query_result.results.entities.size > 0 %}
Contact with AB and AC found!
{% assign siteid_query_result = get_siteID_details.results.entities %}
AB Name: {{ siteid_query_result.cra0d_contract }}
{% else %}
No contacts found
{% endif %}
What is the right approach for the fetch XML? Please advise how to achieve this.