Search code examples
dynamics-crmdynamics-crm-2016fetchxml

How can I view SalesOrder fields in a CRM Marketing list?


I'm trying to create a CRM dynamic marketing list with fields from Contact and the SalesOrder entity.
While I can use SalesOrder fields to filter the list, I can't pick a SalesOrder field for the returned columns.
I'd like the SalesOrder number to appear on the Marketing list, along with the contact details.

Is is possible to get these fields in a Marketing List ?

If not, is it possible to create a way to do this, either as configuration or coded ?

Thanks in advance.


Solution

  • Instead of starting your search from a Marketing List, you could change the query to start from Sales Order. Then you can search for related Contacts fulfilling the same criteria as the query in your Marketing List, and pull in fields from the related Contact.

    This query returns Sales Orders (called Sales Contracts in my system) that have a related Contact which is active. You would fill out the related part with the same query as in your dynamic Marketing List:

    Sales Orders related to Contacts

    You can then show fields from the related Contact:

    Results