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 :
Microsoft Dynamics CRM (Archived)

Stop Auto Populating Lookup Fields

(0) ShareShare
ReportReport
Posted on by 1,695

Hi

We have a number of contacts who are linked into a number of accounts. To help facilitate this we created new account lookup fields and have them displayed on the contacts ie

  1. Primary Account (default account lookup)
  2. Secondary Account (new custom lookup)
  3. Tertiary Account (new custom lookup)
  4. Quaternary Account (new custom lookup)

While the lookups are all independent and work fine (ie you can assign 4 accounts), the issue I have is that when you create a new contact and he has only one account, what happens is that it duplicates the same account into the 3 custom lookup fields

Im not sure why this is.

Has anyone any suggestions?

Thanks

*This post is locked for comments

I have the same question (0)
  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Kieran,

    If you use 4 different fields, 4 different lookup fields, it means 4 different relationship to Account, it should not be happened.

    DO you have any javascript, workflow, or anything?

    It seems when you create new contact, it calls an auto populate function, can be javascript, workflow, or plugin.

  • sitchey Profile Picture
    1,695 on at

    Hi Aileen

    The only JS I have is on the Accounts entity, it set to allow lookups into competitors and accounts and hide the other that's not being used.

    But no JS on the contact entity, which is why this is weird as each of the lookups are all separate.

  • sitchey Profile Picture
    1,695 on at

    also no plugins enabled at this time either

  • sitchey Profile Picture
    1,695 on at

    Just ran another test and noticed something.

    If I create a new contact from the main add new area in contact entity it doesn't auto populate

    However if I create a contact from the Account area (eg in the system view that shows connected accounts and I click the plus to add a new record) it does add in the same account into all 4 lookups.

    2068.2.PNG

    So it must be the quick create contact area that's the issue?

  • sitchey Profile Picture
    1,695 on at

    I tried to add in the 3 new lookups into the quick contact create form and it seems that when creating a new account from the system view in Account it does auto populate all the account records. It is also populating the business phone and address too

    If I use the same quick create form form the contact entity, all lookups are blank as you would expect.

    So for me it has to be something from the Account of system view that is telling it to auto populate these fields

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Kieran,

    I would suggest reviewing the mapping for the two entities. If you look at the relationships between the Account and Contact entities, within those relationships you'll find a Mappings section on the left hand side.

    From there you can evaluate whether there are any mappings to carry through any information to the Contact record when it is created from an already existing Account.

    Hope that helps.

    Aaron

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Kieran,

    I see.

    So, it is because of the system generated mapping if from the same entities, if you see in the Account, suddenly got all of those 4 mappings and there is no way to remove that.

    And due to mapping behavior, you are correct, will autopopulate these fiels.

    And it is happening not only to Account, but to other entities.

    So, you need JavaScript to set the value to Blank as per your expected.

    And Yes, the Addresses also got autopopulated because of the mapping as well, but I tried to remove Address City, it is possible.

    See this link by Scott.

    https://community.dynamics.com/crm/f/117/t/113701.aspx

    You need to write this JavaScript.

    And need to add Xrm.Page.ui.getFormType()==1 or Xrm.Page.ui.getFormType()==5 I think because of you are using Quick Create Form as well.

    if (Xrm.Page.ui.getFormType()==1)

    {

    Xrm.Page.getControl('..attributename...').getAttribute().setValue(null);

    }

    Hope this helps!

    THanks.

  • Community Member Profile Picture
    on at

    Because you have several lookups to the same entity, the mappings will automatically populate all 4 even if you don't want them to, and you cannot remove those from the mappings list.

    I would probably suggest a real-time workflow for Contact,  run on create that checks 2, 3 and 4 and in each case if it is the same as 1, clear out the duplicate value.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans