Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Lookup Field Help

(0) ShareShare
ReportReport
Posted on by

Hi, 

So I am looking at creating a child record to an account, however, when pushing over the ID from the parent to the child's lookup input I am receiving this value:

pastedimage1604071490126v1.png

When this value is clicked on, it takes the user to the correct Account, but as you can see the display name is showing (No Name), the code for this that I use is within a button on the ribbon and reads as follows:

function myFunctionThree() {

//Parent form and fields    
var z = Xrm.Page.data.entity.getId();
//var x = Xrm.Page.getAttribute("name").getValue()

//Desired Form
var entityFormOptions = {};
entityFormOptions["entityName"] = "incident";

//Desired Fields
var formParameters = {};
formParameters["customerid"] = z;
//formParameters["customername"] = x;


//Testing
console.log(x);

// Open the form.
Xrm.Navigation.openForm(entityFormOptionsformParameters).then(
    function (success) {
        console.log(success);
    },
    function (error) {
        console.log(error);
    });
}
Hopefully there is a fix for this as it does set once it is saved.
Thanks,
Jay
  • Suggested answer
    TylerS.Dev Profile Picture
    TylerS.Dev 725 on at
    RE: Lookup Field Help

    this is more of a suggestion but you might want to use formContext instead of Xrm.Page because it has been depreciated.

    docs.microsoft.com/.../clientapi-form-context

  • Suggested answer
    RE: Lookup Field Help

    Update!

    I have managed to solve this as I have discovered that the Lookup field requires an array of data to be pushed into for the Object, ID and Name.

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…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

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,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans