Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Show selected values in lookup object.

(0) ShareShare
ReportReport
Posted on by 15

I'm retrieving single record using xrm webapi. I want to show lookup values as selected in lookup object. I'm using below code to implement lookup object on New item form which is working fine. But how to show selected lookup values in lookup object on edit form.

function OpenSectorLookpUp() {
var lookupOptions = {
defaultEntityType: 'new_sector',
entityTypes:['new_sector'],
allowMultiSelect: false,
customFilters: [],
customFilterTypes: []
};

window.parent.Xrm.Utility.lookupObjects(lookupOptions)
.then(function(result){
if(result.length>0){
console.log(result);
SectorId=result[0].id;
SectorName=result[0].name;
}
})
}

 Please help.

  • Joana Pinto Profile Picture
    Joana Pinto 740 on at
    RE: Show selected values in lookup object.

    Hi,

    I didn't quite understand what is your goal. Can you try to explain in a different way, please?

    And also, is there any error that you can show us or it simple does not do anything?

    Thanks.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,403 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans