web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Identify marketing lists & source/import of record

(0) ShareShare
ReportReport
Posted on by 50

Hello,

We have thousands of records which have been added to accounts, contacts and leads over time, long before I was at the company. Many are assigned to admin accounts, former employees or users that shouldn't own them.

I'm trying to identify two things:

1. What marketing lists is each account, lead or contact associated with? I can't do this with advanced find to my knowledge, so how would I be able to do this? I think maybe FetchXML could work, but I am unfamiliar with how to write the code to do this.

2. How can I identify the original source of the record? Many of the records are missing "lead source" and "topic" data. I know if they were added by user, I could look at the "created by" field.  But if they were imported, am I able to see the file name of original import list that was used? 

I appreciate any help with this.

Thank you,

Adil

I have the same question (0)
  • Suggested answer
    JayBuddhdevtest Profile Picture
    275 on at

    Hi Adil,

    Here are the answers to your questions:

    1. You can create a report and can group it based on Account Name, and add information related to Marketing List or vice-versa. Let me know if you need assistance on creating a report.

    2. It depends upon how the data was imported. If the data was imported using MS out of box data imported you can look at the history under Settings->Data Management->Imports:

    3603.Help1.PNG

    I hope this helps. Let me know if you have any other questions/concerns. I am always happy to help the community at no extra cost.

    Thanks

    Jay

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    1. What marketing lists is each account, lead or contact associated with? I can't do this with advanced find to my knowledge, so how would I be able to do this? I think maybe FetchXML could work, but I am unfamiliar with how to write the code to do this.

    To answer your question, Best place to get the originated marketing list would be listmember table if marketing list is static ML.

    listmember entity is used to store the relationshi between marketing list and Lead/Account/Contact.

    see below web api to retrieve details of listmember entity. Entity ID is nothing but List/Account/Contact ID. Entity Type will tell you which entity it is refering to.

    var req = new XMLHttpRequest();
    req.open("GET", Xrm.Page.context.getClientUrl()   "/api/data/v9.1/listmembers?$select=_entityid_value,entitytype,_listid_value,name", true);
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function() {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 200) {
                var results = JSON.parse(this.response);
                for (var i = 0; i < results.value.length; i  ) {
                    var _entityid_value = results.value[i]["_entityid_value"];
                    var entitytype = results.value[i]["entitytype"];
                    var _listid_value = results.value[i]["_listid_value"];
                    var name = results.value[i]["name"];
                }
            } else {
                Xrm.Utility.alertDialog(this.statusText);
            }
        }
    };
    req.send();

    If found helpful, Please mark my answer verified.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans