Named Query Structure
Learn the required tags, merge field pattern, and format-specific syntax for named queries.
Model
<!--{{!
<lineitemsSOQL>
<queryname>TopLineItem</queryname>
<soql>
SELECT Name, Quantity, TotalPrice
FROM OpportunityLineItem
WHERE OpportunityId = '{{!Opportunity.Id}}'
ORDER BY TotalPrice DESC
LIMIT 1
</soql>
<filter id="1">TotalPrice >= 1000</filter>
</lineitemsSOQL>
}}-->1
2
3
<queryname>TopLineItem</queryname>4
<soql>
SELECT Name, Quantity, TotalPrice
FROM OpportunityLineItem
WHERE OpportunityId = '{{!Opportunity.Id}}'
ORDER BY TotalPrice DESC
LIMIT 1
</soql>5
<filter id="1">TotalPrice >= 1000</filter>6
Merge field quick reference
Pattern
Use
Format-specific variations
Summary table
Part
Meaning
Full example
Last updated
Was this helpful?

