Skip to main content



No record found.

Dynamics 365 general forum
Suggested answer

Relationship object in Xrm.Navigation.navigateTo

(0) ShareShare
Posted on by

I am trying to open at form and pre-populate a lookup field using Xrm.Navigation.navigateTo

This piece of code is being used to create the relationship, however it is not displaying anything.

        pageInput.relationship = {
            attributeName: "crd80_caseloadreview",
            navigationPropertyName: thisRecordName,
            name: "crd80_task_CaseLoadReview_crd80_caseloadreview",
            relationshipType: 0,
            roleType: 1

  • attributeName: has been set to the logical field name on the form
  • navigationPropertyName: is the name of the record I wish to link to
  • relationshipType: is set to one to many
  • I dont really understand what "name" I should be using (have used the relationship name from the entity)
  • I dont really understand what "roleType" to use. is not very informative.

  • Suggested answer
    a33ik Profile Picture
    a33ik Super User on at
    RE: Relationship object in Xrm.Navigation.navigateTo

    Hello Martin,

    Can you please elaborate on your scenario? Am I right that you try to open the new record form and populate the lookup? In this case Xrm.Navigation.openForm is the better candidate for it -

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…


Tina Haerr Profile Picture

Tina Haerr 430

SaverioT Profile Picture

SaverioT 317

Anas Amer Profile Picture

Anas Amer 10


Featured topics

Product updates

Dynamics 365 release plans