# Export record to PDF

Today, I came back to the old functionality - <mark style="color:purple;">**Export to PDF**</mark>.

Previously, this feature only supported out-of-the-box entities like **Account**, **Contact**, **Lead**, **Opportunity**, **Quote**, **Order**, and **Invoice** but did not extend to <mark style="color:green;">**Custom entities**</mark><mark style="color:purple;">**.**</mark>

It's gratifying to see that this functionality has <mark style="color:green;">**now**</mark> been <mark style="color:green;">**implemented**</mark> for the <mark style="color:green;">**Custom Entity**</mark>**.**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FXZIYCVZA9tUnOgVG4xZd%2Fimage.png?alt=media&#x26;token=4c800703-0204-40f9-9458-35b0a0c296f7" alt=""><figcaption><p>Configure "Export to PDF" for entities</p></figcaption></figure>

{% hint style="success" %}
The **Export to PDF** functionality is available on D365 for Sales.

For configuration, Open the **Sales Hub >** move to **App Setting** area > **Productivity tools.** Then choose the **"Conver to PDF"** and configure these entities to apply this functionality.
{% endhint %}

## Scenario: Create a Device Card

My case: I must create a Device Card to show Device information. The user will export it to PDF and send it to the customer.

I have a custom entity called **Device** that stores the device information of customers.

**Involve Steps**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2F5czOWSsdMBqtKQPqhpzM%2Fimage.png?alt=media&#x26;token=316c0b48-167f-49fa-9166-019b49e72a66" alt=""><figcaption><p>Configure Export to PDF</p></figcaption></figure>

### 1. Configure Word Template - "Device Card"

My sample Word Template "Device Card" is below.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2F54Jra890pSsKDCor2NKP%2Fimage.png?alt=media&#x26;token=969c9464-3bc7-4009-8a6e-4c7824ad17a7" alt=""><figcaption><p>Sample "Device Card" - Thank you</p></figcaption></figure>

### 2. Enable "Export to PDF" for entity Device

Configure in **Sales Hub > App Setting >** under **Productivity Tools**, click menu **"Convert to PDF"** then **select entity Device** > click **Save** to enable.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FXZIYCVZA9tUnOgVG4xZd%2Fimage.png?alt=media&#x26;token=4c800703-0204-40f9-9458-35b0a0c296f7" alt=""><figcaption><p>Enable function for entity "Device"</p></figcaption></figure>

### **3. Check the "Export to PDF" button on the Device entity:**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FbdGrgqeIbEP4vzAGg43Q%2Fimage.png?alt=media&#x26;token=7f8b3eab-00b9-49fd-9fba-e18a2c67b69d" alt=""><figcaption><p>Button "Export to PDF" is visible</p></figcaption></figure>

Ya.. here, I completed enabling the functionality "Export to PDF" for the custom entity "Device". :tada:

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FVYtBg76RcDQX4YzLqLOT%2Fimage.png?alt=media&#x26;token=0970f8b0-0cfd-4769-bb98-cc2e9c1b2e87" alt=""><figcaption><p>Screenshot - Export to PDF</p></figcaption></figure>

<mark style="background-color:green;">**Live Testing on Sales Hub:**</mark>

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FgG4uF8nWVcV0g3Gq8ffs%2F_Test_Export_PDF_Device.gif?alt=media&#x26;token=751c565b-ce18-42bf-ad51-f65b07ad1610" alt=""><figcaption><p>Live check - Export to PDF</p></figcaption></figure>

## Send email "Device Card.pdf" to customer

In "Export to PDF" screen > click on **\[Email]** icon to send this Device Card.pdf file to the customer via email.

* The Email record will be created
* This Email will be shown on the Timeline are of the customer.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FpK4dVy40gGHASX6rgRdG%2FSend_email_device_card.gif?alt=media&#x26;token=89565a91-90a6-4457-b5e5-2d34f8283f87" alt=""><figcaption><p>Send email on "Export to PDF"</p></figcaption></figure>

Check **Email** record on Timeline area of **Contact - John John**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FKhgW0CMCFfrIusD4pCyx%2Fimage.png?alt=media&#x26;token=2483d1ec-ec98-4649-8040-c860bab99be7" alt=""><figcaption><p>Email Record on Contact</p></figcaption></figure>

Hoping well. :heart\_hands:

Thank you for your reading.\
\&#xNAN;**\[NTD]yns.Asia**\ <mark style="color:red;">...</mark>[<mark style="color:red;">invite me a cup.</mark>](https://ko-fi.com/ntdyns/?ref=qr\&amp;v=2) :coffee: Thank you. :heart:
