Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Embed marketing form in external page

(0) ShareShare
ReportReport
Posted on by 15

Hi,

Is there a way I can embed a marketing form into an external ASP.NET webpage? I saw the documentation here: https://docs.microsoft.com/en-us/dynamics365/marketing/embed-forms , but I am looking for something slightly different. 

My use case:

  1. query the list of forms by making a request to /api/data/v9.2/msdyncrm_marketingforms 
  2. select the form I want to embed 

What options do I have to embed the selected form in a page from my ASP .NET project, render it and be able to submit it?

I have attached a sample JSON object of a form for reference.

Thank you

[View:/cfs-file/__key/communityserver-discussions-components-files/768/sample_2D00_form.json:320:240]

  • Verified answer
    AlexJay Profile Picture
    AlexJay 420 on at
    RE: Embed marketing form in external page

    Hi Adrian, 

    In case it helps, the javascript embed code exists on a table called msdyncrm_formpage (aka "Form Hosting" in the UI) you could potentially query the API with something like the below to pull the javascript embed code for a specific form or don't reference a specific form to pull back all form pages / embed scripts for all forms. Bear in mind, it's a 1:N so you can have multiple form pages for one form, but you could also filter based on the associated marketing website instead of a specific form. 

    https://xxxxxxxxx.crm11.dynamics.com/api/data/v9.2/msdyncrm_formpages?$select=msdyncrm_javascriptcode&$expand=msdyncrm_marketingformId()&$filter=(msdyncrm_marketingformId/msdyncrm_marketingformid eq bc16de9c-5f95-ec11-b400-000d3a874628)

    Thanks

    Alex

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans