Skip to main content

Notifications

Community site session details

Community site session details

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

CI-J Real-Time Marketing Form - Add Company Name

(2) ShareShare
ReportReport
Posted on by 60
I am trying to create a form to collect name, email, company, and job title. I see that someone else asked a similar question in the thread below but it was 5 years ago so I'm wondering if there has been a better solution since then. It seems like a really simple ask to have available on a form. I am trying to use the "parentcustomerid" field from the contact record.
 
 
  • Suggested answer
    AS-15041545-0 Profile Picture
    36 on at
    CI-J Real-Time Marketing Form - Add Company Name
    Please note that "customer" is a special field in Dynamics that can mean either a contact or an account and as such it tends to have some unique usage requirements.
     
    Cheers Anne
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    5,970 Super User 2025 Season 1 on at
    CI-J Real-Time Marketing Form - Add Company Name
    Hello BJ-20051632-0,
     

    You're right to question if there's a better solution than the one discussed five years ago, especially with the evolution of Dynamics 365 Marketing forms.

    Good News: Yes, there have been significant improvements, and you can now directly achieve this within the Dynamics 365 Marketing form editor without relying on the older, more complex workarounds involving hidden fields and JavaScript for pre-population.

     

    The Modern Solution: Using Lookup Fields and Default Values

    The most straightforward and supported way to collect the Company (Account Name) and Job Title associated with a Contact filling out a Marketing form is by using Lookup fields and leveraging default values based on the contact record.

    Here's how you can set up your form:

    1. Create the Form Fields:

       

      • First Name: Use a standard Short text field and map it to the First Name (firstname) field of the Contact entity. Mark it as Required.

      • Last Name: Use a standard Short text field and map it to the Last Name (lastname) field of the Contact entity. Mark it as Required.

      • Email: Use a standard Email field and map it to the Email Address 1 (emailaddress1) field of the Contact entity. Mark it as Required.

      • Company: Use a Lookup field.

        • Map to user input: Select Account (account).

        • Map to field: Choose the parentcustomerid field of the Contact entity.

        • Default value: This is the crucial part. When configuring the Lookup field, you should see an option to set a Default value. You can configure this to "Prefill value" and then select "Contact" as the source entity and "Account Name" (parentcustomerid.name) as the field to prefill from.

        • Read-only: If you only want to display the company and not allow the Contact to change it, you can set the Read-only property of this Lookup field to Yes.

        •  

      • Job Title: Use a standard Short text field.

        • Map to user input: Select Contact (contact).

        • Map to field: Choose the Job Title (jobtitle) field of the Contact entity.

        • Default value: Similar to the Company field, set the Default value to "Prefill value", select "Contact" as the source entity, and "Job Title" (jobtitle) as the field to prefill from.

        • Read-only: If you only want to display the job title, set Read-only to Yes. 

        •  

    2. Configure Form Settings:

      • Ensure your form is set to "Update contacts/leads" on submit. This is usually the default behavior.

      • Make sure the field mappings are correct so that the data entered by the Contact updates the corresponding fields on their Contact record.


      •  

    3.  

    Why This Works and is Better:

    • Direct Mapping: You are directly mapping the "Company" Lookup field to the parentcustomerid of the Contact. Dynamics 365 Marketing handles the relationship and display of the Account name.

    • Prefill Values: The "Default value" option allows you to automatically populate the Company and Job Title fields with the existing data from the Contact record filling out the form. This happens when a known Contact (based on their browser cookie or email address matching an existing Contact) submits the form.

    • No Custom Code: This solution is entirely configuration-driven within the Dynamics 365 Marketing form editor, eliminating the need for JavaScript or hidden fields.

    • Supported Functionality: This leverages the intended features of Dynamics 365 Marketing forms for handling related entity data.

    • Improved User Experience: Known Contacts will see their Company and Job Title pre-filled, making the form quicker to complete (or just review if the fields are read-only).

    •  

    Addressing the "parentcustomeridname is read-only" Warning:

    The warning message "Field parentcustomeridname is read-only and cannot be used in the form" likely appears if you try to directly add the parentcustomeridname field (the name of the related Account) as a direct input field on the form. This field is a calculated, read-only value that displays the name of the Account linked through the parentcustomerid lookup.

    By using a Lookup field mapped to parentcustomerid and then utilizing the "Default value" to prefill the name from the related Account, you are correctly referencing the relationship and displaying the desired information without trying to directly use the read-only name field for input.

     

    In summary, use Lookup fields for "Company" and "Job Title" and leverage the "Default value" option to prefill these fields with data from the Contact record. This is the modern, supported, and much simpler way to achieve your requirement in Dynamics 365 Marketing forms.

     
    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
  • Suggested answer
    Daniel Norris Profile Picture
    41 on at
    CI-J Real-Time Marketing Form - Add Company Name
    You can use the standard companyname field 
     
     
    This is just to collect a string text field. If you want to create an account as well each time that would probably need a flow. 

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,095 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans