Skip to main content
All CollectionsTechnical DocumentationVarious
Show Owner of Contact with Template
Show Owner of Contact with Template

Template | Code

Updated over 4 years ago

When you use multiple fields in your Carerix application, every Contact each field have its own Owner.
When you use <cx:write value="$activity.toContact.owner.name"/> in a Template, the Owner of the first field is shown. This is not desired.

Explanation

To show the right Owner of a Contact, you need to use the following code:

<cx:let name="owner" value="$activity.toContact" invoke="ownerForProduct:">
<cx:parameter name="0" value="$activity.owner.toProductNode"/>
<cx:write value="$owner.name"/>
</cx:let>

With the script above, the Owner of a Contact is shown that belongs to the same field as the person that uses the template.

Remarks

When you use multiple Fields in your application, not only every Contact has its own Status and Owner, but also every Company has its own Status and Owner.

____
Keywords : UD-1854

Did this answer your question?