Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

campaign response from change default customer look up from default account to contact

Posted on by Microsoft Employee

Hello

on the campaign response form there is a look up to customer which defaults to account entity

is it possible to have it default to contacts entity instead when selecting look up?

*This post is locked for comments

  • Suggested answer
    MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: campaign response from change default customer look up from default account to contact

    Try this in your case:-

    var control = Xrm.Page.getControl("customer");

    control.getAttribute().setLookupTypes(["contact"]);

  • Suggested answer
    MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: campaign response from change default customer look up from default account to contact

    E.g If you want to set "regarding" field in phone call to "contact" entity only.

      var control = Xrm.Page.getControl("regardingobjectid");

      control.getAttribute().setLookupTypes(["contact"]);

    community.dynamics.com/.../186304

    You can modify attributes according to your requirements.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: campaign response from change default customer look up from default account to contact

    Hi,

    Try using the Javascript code below.

    Xrm.Page.getControl("customerid").setDefaultView("ContactsViewGuid");

    This sets the default entity type to Contact for the Customer Lookup.

    See: https://community.dynamics.com/crm/f/117/t/190202

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: campaign response from change default customer look up from default account to contact

    sorry seems like there is confusion in the question; at the moment when selecting the look up if defaults straight to Account Entity i need it to default to contact entity instead.

  • MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: campaign response from change default customer look up from default account to contact

    Refer to this link

    community.dynamics.com/.../159609

  • MNarmeen Profile Picture
    MNarmeen 1,846 on at
    RE: campaign response from change default customer look up from default account to contact

    An unsupported way could be

    nycrmdev.blogspot.com/.../changing-default-view-of-inline-lookup.html

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