Skip to main content

Notifications

Announcements

No record found.

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

Using FetchXML in Marketing Form

Posted on by 14
Hi,
 
We have a marketing form containing some lookup fields. The requirement includes complicated cascading filters on these lookup fields, which is why I'm thinking about using FetchXML. Note that the fields are in a custom table, not Contact or Lead. To give a better understanding:
  • Table A:
    • Column A-1
    • Column A-2
    • Column A-3
  • Table B:
    • Column B-1 (lookup to A-3)
    • Column B-2
The filter on the form will be:
  • Selection in Column A-1 to filter the list of A-2
  • Selection in Column A-2 to filter the list of A-3
  • Selection in Column A-3 to filter the list of B-2
 
My question is, can we use FetchXML in a marketing form, especially if that form will be embedded as iframe in an external website?
 
Could you also please give me some examples of how to incorporate that in the native/basic JavaScript?
 
Thank you
  • la_belle Profile Picture
    la_belle 14 on at
    Using FetchXML in Marketing Form
    Thank you Rudy. I will try what you suggested and let you know.
  • Suggested answer
    RudyZhang Profile Picture
    RudyZhang Microsoft Employee on at
    Using FetchXML in Marketing Form
    Hi,
     
    Our team has not searched for information on "Using Fetch XML at D365 Marketing From", your needs may not be supported by the out-of-the-box functionality.
     
    Below is an alternative solution proposed by our team.
    According to the official documentation, you can extend your Marketing Form with JavaScript Code, you need to switch the tab from " Design" to "HTML" and then insert the Code.

    Please refer to the official documentation in the link below for more details.
    https://learn.microsoft.com/en-us/dynamics365/marketing/developer/marketing-form-client-side-extensibility
     
    So, we use Fetch XML Builder to convert Fetch xml to JavaScript Code, here are some short steps to help you understand the program.
    Step1, connect to the environment where your target entity is located.

    Step2, select the target entity, edit the query conditions, you can execute a query at this time to make sure there is no error.

    Step3, click "Convert" and choose to convert to "JS Code".

     
    For the use of Fetch XML Builder, please refer to the following link.
    https://fetchxmlbuilder.com/
     
     
     
     
    I hope my answer is helpful to you! If you have any other questions, please feel free to contact me.
     
    Best Regards,
    Rudy Zhang

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans