web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Insights - Journeys forum
Answered

Marketing Email Assistant can not show lookup field name

(5) ShareShare
ReportReport
Posted on by 65

Hi Dynamics Marketing Expert,

Does anyone know, is it true that Marketing Email assistant can not show lookup name field?

I made a Marketing Email contains 3 fields which 2 fields are single line of text and 1 field is lookup field.

When I tried to send the email, the lookup field show the GUID, not the name of the lookup field.

Here's the marketing email that I created:

pastedimage1571911555373v2.png

Here's the result:

pastedimage1571911638023v3.png

Data like below:

pastedimage1571911991902v5.png

So, is it true that marketing email assistant can not show the name of lookup field? or are there any steps that I have missed?

Thank you.

Regards,

Audrey

  • AmeyHolden Profile Picture
    230 on at
    RE: Marketing Email Assistant can not show lookup field name

    I posted an idea for this to be increased to beyond 2 hops please cote it up experience.dynamics.com/.../

  • Audrey Amelia Profile Picture
    65 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Karl,

    Ok, noted.

    Thank you for your correction. It's really help.

    I appreciated.

    Audrey

  • Verified answer
    Karl Maybach Profile Picture
    on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Audrey,

    The problem is that you have one too many hops (dots) in your expression. The system only supports two, and you have three, which is why you are getting the error. (The final hop, highlighted in purple, is one too many):

    {{contact.contact_xts_vouchers_xts_vouchercodetempid.xts_vouchers_xts_mnflactivitydetail_xts_healthchecktypeid.xts_txtdeskripsi}}

    I can see why you want to make that hop (so you can show readable text instead of a record ID), but the system won't support this because it's too far away from your original entity.

    You mentioned earlier that you used a custom plugin to add the country name you were looking for directly onto the account record. I think you'll need to do something similar here to eliminate the extra hop that is still generating errors in your code.

    . Karl

  • Audrey Amelia Profile Picture
    65 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Karl,

    Thank you for your suggestion, I appreciate it.

    Btw, I've already tried your suggestion just like Mao said, but it doesn't works. The error msg appears after I check the errors.


    So there are 3 entities that I had,
    Entity1 : contact 
    idFieldEntity1 : contactid
    customField Entity1 : xts_vouchertempid related with xts_voucher 

    Entity2 : xts_voucher
    idFieldEntity2 : xts_voucherid
    customFieldEntity2 : xts_healthchecktypeid related with xts_mnflactivitydetail 

    Entity3 : xts_mnflactivitydetail
    idFieldEntity3 : xts_mnflactivitydetailid
    primaryFieldEntity : xts_txtdeskripsi as single line of text

    The value that I need to show is value from xts_txtdeskripsi.
    So I tried to put this dynamics expression for email like below
    {{contact.contact_xts_vouchers_xts_vouchercodetempid.xts_vouchers_xts_mnflactivitydetail_xts_healthchecktypeid.xts_txtdeskripsi}}

    but I got error msg after I check for errors. Here's the error
    Text: Your message includes dynamic content that doesn't evaluate correctly. Please revise dynamic content, exclude expressions that cannot be compiled, and try again.

    pastedimage1572321002904v1.png


    So, are there any steps that I've missed?

    Thank you

    Audrey

  • Karl Maybach Profile Picture
    on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Audrey,

    Sounds like you found a solution, but here is what I can tell you about this.

    Currently, there is a limit of two hops ("dots") in dynamic expressions for emails. That means that you can display names (or any field value) of records referenced by a lookup field that is directly on the first named entity, such as: {{Entity1.Entity1LookupToEntity2.Entity2Field}}. But to get to the name you are looking for, you'd need a third one, such as: {{Entity1.Entity1LookupToEntity2.Entity2LookupToEntity3.Entity3Field}}. Each of those lookup fields contains the ID of a related record, so you need an additional hop get to a human-readable field from that related record. But your expression ends on the lookup field itself, which holds an ID only; your expression is essentially {{entity1.Entity1LookupToEntity2.Entity2LookupToEntity3}}, which is why you just get an ID out.

    Another requirement for showing values through a lookup field is that the related entity must be available (synced) to the marketing-insights service.

  • cloflyMao Profile Picture
    25,194 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Audrey,

    It's glad that your problem has been solved.

    Those expresssions were my attemps to get related entity name of contact's company,

    however, seems that its a limitation for dynamic expression to get related entity of an entity's related entity.

    In my thought, there were 3 supported syntax for dynamic expression:

    1.entity.entityField (contextual)

    2.entity.relationshipName.relatedEntityField

    3. entity(entityId).entityField (static)

    In addition, the article in my first reply would be helpful for us to understand relationship definition in assist-edit and how to work with dynamic contents in marketing email,

    and you could still follow that article if you had business requirement that show 1:N relationship entity records of contact in the future.

    Regards,

    Clofly

    If you had found the answer resolved your issue, please kindly mark as verified, it would be greatly appreciated.

  • Audrey Amelia Profile Picture
    65 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Clofly,

    I also tried your suggestion but still can not.

    So I create new field in entity account and put country name in that field using custom plugin.

    Let say the new field named new_countryname.

    When account create or update, my plugin will process to get new_country and put new_country.Name in new_countryname.

    Then dynamics expression : {{contact.contact_account_parentcustomerid.new_countryname}}

    It works for me.

    Regards,

    Audrey

  • cloflyMao Profile Picture
    25,194 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Audrey,

    I have tired many snippets such as below, it seems that multi relationship is not supported in dynamic expression.

    {{contact.contact_account_parentcustomerid.account_new_country_new_country.new_name}} 

    {{new_country({{contact.contact_account_parentcustomerid.new_country}}).new_name}}

    Please let me know if your business requirement could be met by creating a temporary field.

    Regards,

    Clofly

  • Verified answer
    cloflyMao Profile Picture
    25,194 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Audrey,

    Agree with what you thought.

    You'll find the relationship names for contact entity in assist-edit are different from N:1 relationship name that were defined in Customization,

    for example:in Customization, contact to account(company name) relationship name is contact_customer_accounts;

    in dynamic expression, it's contact_account_parentcustomerid.

    I don't know how those relationship expression work exactly, while doc only mentioned relationship between two entities.

    It would be easy to create a temporary field to store value than build complex relationship expression.

    Regards,

    Clofly

  • Audrey Amelia Profile Picture
    65 on at
    RE: Marketing Email Assistant can not show lookup field name

    Hi Clofly,

    Thank you for your response.

    But my case have 3 entities with 2 deep level relationships.

    Let say Contact has lookup field to entity Account then Account has lookup field to entity Master Country.

    What I want to show is Country of the Company Name, which Country is lookup field in entity Account.

    When you try to put the country in marketing email, it will show the GUID of the country, not the name of the country.

    I think we need to create temporary field to store the country name at account entity.

    What do you think?

    Regards,

    Audrey

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

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Blog subscriptions now enabled!

Follow your favorite blogs

TechTalk: How Dataverse and Microsoft Fabric powers ...

Explore the latest advancements in data export and integration within ...

Leaderboard > Customer Insights - Journeys

Featured topics

Product updates

Dynamics 365 release plans