Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Marketing form download with success-view

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

We want to trigger a download via a marketing form. We solve this via a redirect URL. Unfortunately, the success message "Thank you for submitting" is not displayed. The form just stays filled in. How can we trigger both? Display the download via redirect URL and the success message?

Thank you very much in advance.

  • Suggested answer
    MaiElorym Profile Picture
    MaiElorym 40 on at
    RE: Marketing form download with success-view

    Hi, 

    are  you hosting your form on external website, or are you using Portal?

    We are hosting our forms on external website and this worked for me. After copying the script to the external page, I have added another script to initiate download after submitting the form. It looks something like this:

    <script>
    var pdfUrl = "URL with the pdf file";

    MsCrmMkt.MsCrmFormLoader.on('formSubmit', function (event) {
    window.open(pdfUrl, '_blank');
    });
    </script>

    You only need to add the URL link for the PDF file in the var section (it is marked in red). 

    This on my end triggers automatic download, no new window opens, the form shows "Success" message, and you don't need to use Redirect URL

    Let me know if this also helps you

    MaiElorym

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans