# RenderDraw Relationship Settings

#### Setup a RenderDraw Relationship Custom Metadata record for the Product Object

We also set up a custom field for "Drawing Reference". We'll use this field to map the 3D elements to a given record. It was set up as a text field of 255 length.

<figure><img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FCXg0ldDbY4JkSLfTz8q4%2Fimage.png?alt=media&#x26;token=7a363722-0014-4013-9330-42969c5916c2" alt=""><figcaption></figcaption></figure>

#### Setup a RenderDraw Relationship Custom Metadata Record for the Asset object:

This configuration will rely on the Product2 Relationship, referencing the Product Id on the Parent Relationship Settings Lookup field. We use the standard Asset object for this, and no other settings are needed, as they are controlled and provided by the parent settings on the Product Record we set up previously. <br>

<figure><img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FoCCAUOidExOMkmXdIXAV%2Fimage.png?alt=media&#x26;token=e4a9aed6-feb0-43cd-8c69-340bc034dd7b" alt=""><figcaption></figcaption></figure>

#### Create a relay formula field for the Asset object.

We need a way to reference what field will be used to isolate and select elements related to a record in Salesforce. Due to system limitations, we need to reference the Drawing Reference field from the Asset directly. For this, we create a new field on the Asset object as a *formula* field that returns text. The field is named "Drawing Reference", and will have a value of

Product2.Drawing\_Reference\_\_c

Referencing the field we created previously in a read-only way.

#### Create a Digital Twin Setting

We will edit the provided Asset Digital Twin record, and because we are using the standard Asset object, the provided fields all work out of the box.&#x20;

<figure><img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FDUmgvXamrqDgGwi0E6Kb%2Fimage.png?alt=media&#x26;token=bec05726-dd42-4f78-9bf8-f91e4318e2a8" alt=""><figcaption></figcaption></figure>

#### Ensure Lightning Web Security is enabled

<figure><img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FvaDllXrE3ck4eW3WsazZ%2Fimage.png?alt=media&#x26;token=ed127e6c-52b1-4062-ace3-5075a710542d" alt=""><figcaption></figcaption></figure>

To use the Digital Twin components, we have to enable the new Lightning Web Security so our packages can communicate &#x20;

The settings are now complete for Standard visual interaction for an Asset Digital Twin visualization. If you need to extend the standard functionality you can add Digital Twin Action records&#x20;
