Hi,
I'm trying to do something very easy on a page, display some values from a custom entity on a Portals web page using Liquid.
Following along various blogs I've come up with the following code to try and display Contact info.
<h2>Contact Details</h2> <p>{% assign contactid = 'C5A9C763-A516-E811-A82D-000D3AE0CB84' %}</p> <p>{% assign entityname = 'contact' %}</p> <p>{% assign contact = entities[entityname][contactid] %}</p> <div>{{ contactid }}, {{ entityname }} <br />{{ contact.firstname }}</div> <!-- <div>{% if contact %} CreatedOn: {{contact.createdon}} ModifiedOn: {{contact.modifiedon}} {% endif %}</div> -->
This doesn't work now but it did at one stage over the weekend.
The below code to display a custom Invoice entity record.
<h2>Invoice Details</h2> <p>Invoice ID: {{params.id}}</p> <p>{% assign recordid = 'D2AD1983-AC21-E811-A841-000D3AE0E65E' %}</p> <p>{% assign entityname = 'xx_invoice' %}</p> <p>{% assign invoice = entities[entityname][recordid] %}</p> <div>{{ recordid }} <br />{{ invoice.name }}</div> <div>{% if invoice %} CreatedOn: {{invoice.createdon}} ModifiedOn: {{invoice.modifiedon}} {% endif %}</div>
This code has never worked.
I have no idea why this doesn't work.
Any help appreciated.