# By Template

If you want to search records based on Maplytics template then for this we have created the custom action with name “**Inogic.Maplytics.API.Template” (ikl\_InogicMaplyticsAPITemplate).**<br>

Custom action accepts the following parameters.<br>

Template: Specify the Template name. E.g., “Accounts with 10 miles”. When user passes the required parameters and executes this action then the action will return the collection of records.

&#x20;To execute Template action using the C#, use following code.

```
string requestName = "ikl_InogicMaplyticsAPITemplate";

//create request object
OrganizationRequest orgReq = new OrganizationRequest(requestName);

orgReq["Template"] = "Accounts with 10 miles";

 //execute the request
OrganizationResponse response = service.Execute(orgReq);

EntityCollection recordsCollection = (EntityCollection)response.Results["RecordsCollection"];

```
