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

Dynamics E-mail Template - Dynamic Content - Resolved but no value

(3) ShareShare
ReportReport
Posted on by 10
Hi,
 
we have a power automate flow which creates an e-mail based on an e-mailtemplate to send to participants in a summer school, but while the dynamic field for location is resolved the value is not displayed in the actual mails.
 
The technical field name is {!location:locationname;}, but perhaps the issue is that this field is not available on the entity Participation from which the mail is sent?
With level-up I see that the location value is displayed in _location_value@OData.Community.Display.V1.FormattedValue not directly in location. How can we solve this?
 
 
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    6,634 Super User 2025 Season 1 on at
    Dynamics E-mail Template - Dynamic Content - Resolved but no value
    Hello KR-10100945-0,
     

    You've correctly identified the likely root cause: the field locationname (from the related location entity) is not directly available on the Participation entity from which your email is being sent. The fact that Level-up shows the formatted value in _location_value@OData.Community.Display.V1.FormattedValue confirms this.

    Here's a breakdown of why this happens and how to solve it within your Power Automate flow and Dynamics 365 email template:

    Understanding the Data Structure:

    • Your email template is likely associated with the Participation entity.

    • The location information is stored in a separate entity (let's assume it's called Location).

    • There's a relationship (likely a lookup field on the Participation entity) that links a Participation record to a specific Location record. This lookup field will have a schema name like _location_value.

    • When you use {!location:locationname;} in your email template, Dynamics 365 tries to directly access a field named locationname on the Participation entity, which doesn't exist.


    •  

    Solution: Accessing Related Entity Attributes in Power Automate

    You need to explicitly retrieve the related Location record within your Power Automate flow to access its locationname attribute. Here's how you can modify your flow:

    1. Trigger: Your existing trigger (likely based on some condition related to the summer school participation) is fine.

    2. Get the Participation Record: You probably already have an action to retrieve the Participation record that triggers the email. Ensure this action includes the lookup field to the Location entity (e.g., _location_value).

    3. Add a "Get record" Action for the Related Location:

      • After you retrieve the Participation record, add a new action: "Get record".

      • Environment: Select your Dynamics 365 environment.

      • Entity name: Select your Location entity (the actual schema name of your Location entity).

      • Record identifier: In this field, you need to provide the ID of the related Location record from the Participation record. You can get this using dynamic content from the previous "Get record" (Participation) action. Look for the _location_value output. This field contains the GUID of the linked Location record.

       


    4. Use Dynamic Content from the "Get record (Location)" Action:

      • Now, when you configure the action to "Send an email (using a Dynamics 365 email template)", you should have access to dynamic content not only from the Participation record but also from the "Get record (Location)" action you just added.

      • Look for the locationname attribute within the dynamic content of the "Get record (Location)" action. 

    5. Modify the Email Template in Dynamics 365:

      • Go to your Dynamics 365 email template.

      • Instead of using {!location:locationname;}, you need to reference the locationname attribute from the related Location entity that you are now explicitly retrieving in your Power Automate flow.

      • The exact syntax for referencing attributes from related entities within an email template populated by a Power Automate flow can vary slightly depending on how the flow passes the data.


      •  
       

      Here are a couple of common approaches:

      • If Power Automate directly populates the "Regarding" field of the email with the Participation record: In this case, the email template might not directly understand the relationship to the fetched Location record. You might need to pass the locationname as a separate dynamic property from your flow.

      • Passing Data as Input Parameters to the Email Template (More Robust): A cleaner approach is to use the "Perform a bound action" or "Perform an unbound action" step in Power Automate to send the email using the SendEmailFromTemplate action. This allows you to pass a JSON object containing the Participation record and the retrieved Location record (including the locationname). You can then reference these parameters in your email template using a specific syntax (often involving the parameter name and the attribute).
         

        Example using "Perform a bound action" (assuming the email is related to the Participation record):

        • Action: "Perform a bound action"

        • Entity name: participations (your Participation entity schema name)

        • Record ID: The ID of the current Participation record.

        • Action name: Microsoft.Dynamics.CRM.SendEmailFromTemplate

        • Target: (Should be automatically populated with the Participation record)

        • TemplateId: The GUID of your email template.

        • Parameter Name (e.g., relatedData): Enter a name for your parameter.

        • Parameter Value (Expression):

          {
            "participation": @{outputs('Get_the_participation_record')},
            "location": @{outputs('Get_record_(Location)')}
          }


        • In your Email Template: You would then reference the location name using a syntax that accesses this relatedData parameter. The exact syntax depends on the Dynamics 365 version and how the template rendering engine handles custom parameters. It might look something like:

          {{relatedData.location.locationname}}

          or a similar dot-notation based access. You might need to experiment or consult Dynamics 365 documentation for the precise syntax for accessing custom parameters in email templates.



        •  

    Using the Formatted Value (Less Ideal for Direct Use):

    While you see the formatted value in _location_value@OData.Community.Display.V1.FormattedValue, this is primarily for display purposes and might not be directly usable as a value in your email content. It's a string representation of the lookup value (likely the name of the location). The more reliable way is to fetch the actual Location record and use its attributes.

    In summary, the solution involves:

    1. Retrieving the related Location record in your Power Automate flow.

    2. Passing the locationname attribute from the retrieved Location record to your email template (either implicitly if the template context allows or explicitly as a parameter).

    3. Adjusting the syntax in your email template to correctly reference the locationname from the related Location data.

    4.  

    The "Perform a bound action" with a custom parameter is generally the most robust and flexible way to pass related data to email templates in Power Automate. Remember to test your flow and email template thoroughly after making these changes.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • KR-10100945-0 Profile Picture
    10 on at
    Dynamics E-mail Template - Dynamic Content - Resolved but no value
    Thanks Holly, but I want to add the field in a dynamics e-mail template which is called on in the PA flow, not directly in power automate. I'm now trying to add a write table permission on the location table in the form.  I also tried using CoPilot. It suggests using the technical field like this, but this doesn't resolve in the template.
    {!ccp_location:ccp_location_value/@OData.Community.Display.V1.FormattedValue;} 
  • Suggested answer
    Holly Huffman Profile Picture
    5,917 on at
    Dynamics E-mail Template - Dynamic Content - Resolved but no value
    Good morning, afternoon, or evening depending on your location!
     
    It sounds like the issue lies in how Power Automate is pulling the dynamic value from Dataverse and formatting it correctly within the email template.
    Here’s a structured approach to solving this:
     
    Possible Causes & Solutions:
    1. Field Availability in Participation Entity
    • If {!location:locationname;} is resolving but not displaying a value, check whether "Location" exists as a lookup field on the Participation entity.
    • If it's a lookup field, Power Automate may not be accessing the actual formatted name from the related entity.
    2. Using OData Formatted Value
    • As you observed, _location_value@OData.Community.Display.V1.FormattedValue contains the readable display name of the lookup.
    • Instead of referencing {!location:locationname;}, adjust your dynamic content reference in Power Automate to:
      Participation._location_value@OData.Community.Display.V1.FormattedValue
      This ensures that the formatted text is inserted into your email rather than just the GUID.
    3. Using Power Automate Expression for Lookup
    • If Power Automate still fails to populate the correct value, try an expression to retrieve the display name:
      first(triggerOutputs()?['body']?['location_value@OData.Community.Display.V1.FormattedValue'])
      This ensures you extract the first resolved value and avoids null references.
    4. Alternative: Expanding the Lookup in Dataverse Query
    • When retrieving Participation records, include Expand Query in your Dataverse "Get row" action to pre-load related lookup values.
     
    Next Steps
    • Test the adjusted dynamic field in your email template.
    • If necessary, use a Compose action in Power Automate to debug and inspect the data.
    • Consider Expanding the Location lookup field within Dataverse queries if other solutions don’t resolve the issue.
     
    Please note: I teamed up with CoPilot AI to research and craft the best response to your question!
    Hope this helps some!

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 Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans