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:
| Name | Type | Description |
|---|---|---|
Event Logistics Template | Nimble Create Template | Displays event information and logistics related directly to the event. |
| Event Logistics Subtemplate - Products Related to Event with Logistics | Nimble Create Template | The subtemplate of the Event Logistics Template. Displays product information and logistics related to the product. It only returns products that contain logistics. |
| View Event Logistics | Custom Detail Page Button | A 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
Create a new Nimble Create template with the following values:
Field Value Template NameEvent Logistics Subtemplate - Products Related to Event with LogisticsSharing ModeUserSOQL QuerySELECT 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.NameFROM NU__Logistics__r ORDER BY RecordType.Name ASC)FROM NU__Product__cWHERE NU__Event2__c = :param1 AND Id IN (SELECT NU__Product__c FROM NU__Logistic__c)ORDER BY NU__EventSessionStartDate__cSample RecordOptionally, enter a sample event ID, ideally one that has logistics at both the event level and product level. Click Save and then click Edit Template.
In the template editor toolbar, click Source and enter the following HTML source:
- Click Save.
Create the Parent Template
Create a new Nimble Create template with the following values:
Field Value Template NameEvent Logistics TemplateSharing ModeUserBulkify SubtemplatesTRUESOQL QuerySELECT 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.NameFROM NU__Logistics__r ORDER BY RecordType.Name ASC)FROM NU__Event__cWHERE Id = :param1Sample RecordOptionally, enter the same event ID you specified in the subtemplate. Click Save and then click Edit Template.
In the template editor toolbar, click Source and enter the following HTML source:
- Click Save.
Create the View Event Logistics Button
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¶m1={!NU__Event__c.Id}&renderAs=pdfFor the
templateIdparameter, use the template record ID for the Event Logistics Template, not the subtemplate.For the
param1parameter, 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.