Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Each code on account

(0) ShareShare
ReportReport
Posted on by 235

Hi, I have created new each code to merge a field

from an related entity from

account. The code I have created shows no errors, but I Am not able to see anything when I am sending the email... It’s just empty even though I know there is data in the field I am trying to show.. 

Any idea what that can be? 

kind regards

camilla 

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Each code on account

    Hi Frieso,

    I am afraid that substr is not available.

    Dynamic expression of marketing email is implemented from Handlebarsjs and only 'if' and 'each' helpers are supported.

    https://handlebarsjs.com/guide/builtin-helpers.html

    However, due to javascript is not supported by marketing email, therefore, we couldn't add custom helper.

    Regards,

    Clofly

  • Oseirf Profile Picture
    Oseirf 67 on at
    RE: Each code on account

    Hi Clofly

    thanks for your answer - what a pity with the "3 Hops". Hope this is implemented soon.

    Do you know if it's possible to "substring" some values? Facing the "3 hops" problem I could substring from a combined field some needet value.

    The datamodel is:

    <Customer> - <Connection> - <Role>

    In the table <Connection> I have a field "Name" where the value is in the format "<customerName> - <RoleName>" so if I could "substring" find the "-" in the value an then get the RoleName I have my 3rd hope by accessing this combined value.  

    Is there something like {{#substr (this.Name, XXXX) }} ??

    Regards

    Frieso

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Each code on account

    Hi Frieso,

    We can have, at most, two hops (periods) in our field expressions.

    Even though {{this.opportunity_systemuser_owninguser.fullname}} has only two hops, but it could be regarded as {{contact.opportunity_contact_customerid.opportunity_systemuser_owninguser.fullname}}, which has three hops.

    In simple terms, fullname of  associated opportunities' owner is too far away from contact entity, only attribute of directly related entity of contact is supported to be added.(e.g: {{this.name}})

    The issue you encountered is similar to question of the following thread:

    https://community.dynamics.com/365/marketing/f/dynamics-365-for-marketing-forum/370438/marketing-email-assistant-can-not-show-lookup-field-name

    A community member has created an idea in Ideas forum that requesting support for more hops in email, you could vote on it.

    https://experience.dynamics.com/ideas/idea/?ideaid=0adb09f7-1f13-eb11-8441-0003ff68a0b0

    Regards,

    Clofly

  • Oseirf Profile Picture
    Oseirf 67 on at
    RE: Each code on account

    Hello Everybody,

    We are  using both dynamics 365 Marketing and Sales. What I'm trying now is to get the "Owner-Fullname" of an opportunity inside an E-Mail:

    {{#each contact.opportunity_contact_customerid}}</li>

             <li>Verkaufschance Name: {{this.name}}</li>    <<- Works

             <li>Verkaufschance Offerte Versendet am: {{this.sendDate_offer}}</li>   <<-Works

             <li>Verkaufschance Besitzer: {{this.opportunity_systemuser_owninguser.fullname}}</li>  <<--Does not Work: Error: too many hops

    <li>{{/each}}    

    But if I select a "Static" Opportunity it works:

    {{opportunity(2558eaf4-3b14-45cd-9d94-6d4dce56c82231a).opportunity_systemuser_owninguser.fullname}}
    Any hints?
    KR
    Frieso

                             

  • Camilla Larsson Profile Picture
    Camilla Larsson 235 on at
    RE: Each code on account

    Thank you Clofly.

    I will try this

    Camilla

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Each code on account

    Hi Camilla,

    Sorry for the late response, I came back to work the day before yesterday.

    I created a custom entity called "Charging Chip", and added a lookup field "Chip Owner For Company"(Contact) to the entity.

    In addition to enable the entity in marketing data configuration, please check whether the "Change tracking" option of the entity was also checked, and try putting the name value within p tag.

    {{#each contact.new_chargingchip_contact_new_chipownerforcompanymember}}
    

    {{this.new_name}}

    {{/each}}

    pastedimage1602211766672v1.png

    Regards,

    Clofly

    Regards,

    Clofly

  • Camilla Larsson Profile Picture
    Camilla Larsson 235 on at
    RE: Each code on account

    Hi,

    Yes I am trying to show data from a related record  from an account. This is the code I have.

    {{#each contact.new_chargingchip_contact_new_chipownerforcompanymember}}

    {{this.new_name}}

    {{/each}}

    Kind Regards

    Camilla

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Each code on account

    Hi Camilla,

    Could you share me your code?

    As per my understanding, were you trying to get related records of parent account(company name field) of contact?

    For example: show other contacts of the parent account in content of marketing email.

    Regards,

    Clofly

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans