Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

setting up default value for a lookup on user or team doesn't load user or team icon

Posted on by Microsoft Employee

Hi!

I'm populating a lookup with default values and team name gets passed. However, the default icons does not.Any advice?

var idval = data.value["0"]._ownerid_value;
var tval = data.value["0"]["_ownerid_value@OData.Community.Display.V1.FormattedValue"];

var towner = new Array();
towner[0] = new Object();
towner[0].id = idval;
towner[0].name = tval;
towner[0].entitytype = 'team';

Xrm.Page.getAttribute("ownerid").setValue(towner);
Xrm.Page.getAttribute("ownerid").setRequiredLevel("none");

then I get:

lookup.jpg

The team icon does not gets set 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: setting up default value for a lookup on user or team doesn't load user or team icon

    lol What? I never misspell a word! .....Thanks!

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: setting up default value for a lookup on user or team doesn't load user or team icon

    Hello,

    Try to replace line

    towner[0].entitytype = 'team';

    with line

    towner[0].entityType = 'team';

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans