Skip to main content
Skip table of contents

Author a Nimble Create Template to View Event Logistics

If your association uses event logistics, staff may want to view a single report that shows all logistics for an event, whether the logistic is related to a child product record or directly to the event record. This recipe provides one way you can create this report using Nimble Create.


Ingredients

You will create the following ingredients in your org to make this recipe:

NameTypeDescription

Event Logistics Template

Nimble Create TemplateDisplays event information and logistics related directly to the event.
Event Logistics Subtemplate - Products Related to Event with LogisticsNimble Create TemplateThe subtemplate of the Event Logistics Template. Displays product information and logistics related to the product. It only returns products that contain logistics.
View Event LogisticsCustom Detail Page ButtonA button on the event record page that renders the Events Logistics Template.

Directions

We'll first create the two template records, and then we'll make the parent template available via a button on the event record page.

Create the Subtemplate

  1. Create a new Nimble Create template with the following values:

    FieldValue
    Template NameEvent Logistics Subtemplate - Products Related to Event with Logistics
    Sharing ModeUser
    SOQL Query

    SELECT Name,
    NU__EventSessionStartDate__c,
    NU__EventSessionEndDate__c,
    NU__Event2__c,
    (SELECT Name,
    NU__BreakdownDuration__c,
    NU__Description__c,
    NU__EndTime__c,
    NU__Item__c,
    NU__MonitorEmail__c,
    NU__MonitorName__c,
    NU__MonitorPhone__c,
    NU__Quantity__c,
    NU__Room__r.Name,
    NU__SetupDuration__c,
    NU__StartTime__c,
    NU__TotalCost__c,
    NU__UnitCost__c,
    RecordType.Name
    FROM NU__Logistics__r ORDER BY RecordType.Name ASC)

    FROM NU__Product__c

    WHERE NU__Event2__c = :param1 AND Id IN (SELECT NU__Product__c FROM NU__Logistic__c)

    ORDER BY NU__EventSessionStartDate__c


    Sample RecordOptionally, enter a sample event ID, ideally one that has logistics at both the event level and product level.
  2. Click Save and then click Edit Template.

  3. In the template editor toolbar, click Source and enter the following HTML source:

    Show Me the Source HTML...

    <div>
    <h3>{!NU__Product__c.Name}</h3>

    <div>{format({!NU__Product__c.NU__EventSessionStartDate__c}, {date, EEE, MMM d, h:mm a})}<renderpanel data-if="NU__EventSessionEndDate__c != null">&nbsp;&ndash; {format({!NU__Product__c.NU__EventSessionEndDate__c}, {date, EEE, MMM d, h:mm a})} </renderpanel></div>

    <div>&nbsp;</div>

    <div>
    <table border="1" cellpadding="5" cellspacing="0" style="width:100%" summary="NU__Logistics__r">
    <thead>
    <tr>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Record Type</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Item</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Quantity</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Details</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>{!NU__Logistics__r.RecordType.Name}</td>
    <td>{!NU__Logistics__r.NU__Item__c}</td>
    <td>{!NU__Logistics__r.NU__Quantity__c}</td>
    <td>
    <div>{!NU__Logistics__r.NU__Description__c}</div>

    <div>{!NU__Logistics__r.NU__Room__r.Name}</div>

    <div>{format({!NU__Logistics__r.NU__StartTime__c}, {date, EEE, MMM d, h:mm a})}</div>

    <div>{format({!NU__Logistics__r.NU__EndTime__c}, {date, EEE, MMM d, h:mm a})}</div>
    </td>
    </tr>
    </tbody>
    </table>
    </div>
    </div>

    <div>
    <div>
    <div style="page-break-after: always"><span style="display:none">&nbsp;</span></div>

    <div>&nbsp;</div>
    </div>
    </div>

  4. Click Save.

Create the Parent Template

  1. Create a new Nimble Create template with the following values:

    FieldValue
    Template NameEvent Logistics Template
    Sharing ModeUser
    Bulkify SubtemplatesTRUE
    SOQL Query

    SELECT Name,
    Id,
    NU__City__c,
    NU__Country__c,
    NU__EndDate__c,
    NU__Location__c,
    NU__StartDate__c,
    NU__StateProvince__c,
    (SELECT Name,
    NU__BreakdownDuration__c,
    NU__Description__c,
    NU__EndTime__c,
    NU__Item__c,
    NU__MonitorEmail__c,
    NU__MonitorName__c,
    NU__MonitorPhone__c,
    NU__Quantity__c,
    NU__Room__r.Name,
    NU__SetupDuration__c,
    NU__StartTime__c,
    NU__TotalCost__c,
    NU__UnitCost__c,
    RecordType.Name
    FROM NU__Logistics__r ORDER BY RecordType.Name ASC)

    FROM NU__Event__c

    WHERE Id = :param1

    Sample RecordOptionally, enter the same event ID you specified in the subtemplate.
  2. Click Save and then click Edit Template.

  3. In the template editor toolbar, click Source and enter the following HTML source:

    Show Me the Source HTML...

    <table align="left" border="0" cellpadding="25" cellspacing="0" style="width:8in">
    <tbody>
    <tr>
    <td>
    <h1>Logistics Report: {!NU__Event__c.Name}</h1>

    <div>{format({!NU__Event__c.NU__StartDate__c}, {date, EEE, MMM d, h:mm a})}<renderpanel data-if="NU__EndDate__c != null">&nbsp;&ndash; {format({!NU__Event__c.NU__EndDate__c}, {date, EEE, MMM d, h:mm a})} </renderpanel></div>

    <div>
    <div>{!NU__Event__c.NU__Location__c}</div>

    <div>{!NU__Event__c.NU__City__c}<renderpanel data-if="NU__StateProvince__c != null">,&nbsp;{!NU__Event__c.NU__StateProvince__c}</renderpanel><renderpanel data-if="NU__Country__c != null">,&nbsp;{!NU__Event__c.NU__Country__c}</renderpanel></div>

    <div>&nbsp;</div>

    <table align="center" border="0" cellpadding="10" cellspacing="0" style="width:100%">
    <tbody>
    <tr>
    <td style="background-color:rgb(217, 237, 247); border-color:rgb(188, 232, 241)">
    <div style="text-align:center"><em>This is a report of all logistics for the event. It includes logistics related directly to the event, as well as logistics related to the event&#39;s products.</em></div>
    </td>
    </tr>
    </tbody>
    </table>

    <h2>Event Logistics</h2>

    <table align="center" border="0" cellpadding="10" cellspacing="0" style="width:100%">
    <tbody>
    <tr>
    <td style="background-color:rgb(217, 237, 247); border-color:rgb(188, 232, 241)">
    <div style="text-align:center"><em>These are logistics related directly to the event record.</em></div>
    </td>
    </tr>
    </tbody>
    </table>

    <div>&nbsp;</div>

    <div>
    <table border="1" cellpadding="5" cellspacing="0" style="width:100%" summary="NU__Logistics__r">
    <thead>
    <tr>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Record Type</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Item</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Quantity</th>
    <th scope="col" style="background-color:rgb(238, 238, 238)">Details</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>{!NU__Logistics__r.RecordType.Name}</td>
    <td>{!NU__Logistics__r.NU__Item__c}</td>
    <td>{!NU__Logistics__r.NU__Quantity__c}</td>
    <td>
    <div>{!NU__Logistics__r.NU__Description__c}</div>

    <div>
    <div>{!NU__Logistics__r.NU__Room__r.Name}</div>

    <div>{format({!NU__Logistics__r.NU__StartTime__c}, {date, EEE, MMM d, h:mm a})}</div>

    <div>{format({!NU__Logistics__r.NU__EndTime__c}, {date, EEE, MMM d, h:mm a})}</div>
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    </div>

    <div style="page-break-after: always"><span style="display:none">&nbsp;</span></div>

    <p>&nbsp;</p>

    <h2>Event Product&nbsp;Logistics</h2>

    <table align="center" border="0" cellpadding="10" cellspacing="0" style="width:100%">
    <tbody>
    <tr>
    <td style="background-color:rgb(217, 237, 247); border-color:rgb(188, 232, 241)">
    <div style="text-align:center"><em>These are logistics related directly to the event&#39;s product&nbsp;records.&nbsp;Only products with logistics are displayed.</em></div>
    </td>
    </tr>
    </tbody>
    </table>

    <div><subtemplate data-params="param1={!NU__Event__c.Id}" data-templateid="" data-templatename="Event Logistics Subtemplate - Products Related to Event with Logistics">Event Logistics Subtemplate - Products Related to Event with Logistics</subtemplate></div>
    </div>
    </td>
    </tr>
    </tbody>
    </table>

    <div>&nbsp;</div>

  4. Click Save.

Create the View Event Logistics Button

  1. Author a Nimble Create Template to create and add a button on the event record page.

    The URL (which is what you enter in the large text box) that works in your org varies depending on the templateId, but in general it should look something like this: /apex/NUTPL__TemplateViewer?templateId=a2H0b0000016NS9EAM&param1={!NU__Event__c.Id}&renderAs=pdf

    For the templateId parameter, use the template record ID for the Event Logistics Template, not the subtemplate.

    For the param1 parameter, use: {!NU__Event__c.Id}

    Rendering as a PDF is optional, but recommended if staff will be printing this rendered template.

Once the button is added to the event record page, all the logistics for an event are just one click away. The report also includes page breaks for convenient printing.

This is just one way to display the logistics. Feel free to modify either template or add more subtemplates to suit your association's needs.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.