Hi, we're using Microsoft Dynamics 365 v.1612 on premises and have stumbled upon a little problem.
We have an accounts entity that can have multiple contacts attached to it, which show as a table on the form, created from a quick view on the contacts entity.
On the account entity, we have set up a Word template to export data from the form to a report, but we don't seem to be able to choose which of the contacts it exports. It always chooses the first contact in the list.
Also, if the first contact doesn't have data in all of it's fields, the export will look to the next contact in the list and take any missing data from that, ending up with a Word document holding mixed contact details!
We have set a field in the contacts entity that is used to show which is the main contact for the account, and would like only that contact to appear on the resulting Word document, but still need all contacts to appear on the accounts form.
Is there any way we can do this? Maybe using Javascript or similar?
I have used Xrm.Page.ui.quickForms.get(quickviewname) to get data from quick view forms on pages, but that code doesn't seem able to access the quick view tables.
Below is a screenshot of our accounts page with the contacts table in the bottom right corner.
[View:https://imgur.com/iJ5KIj2:320:50]
*This post is locked for comments