web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Relationship parameter in Xrm.Navigation.navigateTo

(0) ShareShare
ReportReport
Posted on by 5

Hi Guys,

My goal is open some form of record using Xrm.Navigation.navigateTo method and show an associated view of the Documents entity (Sharepoint locations) at the same time. The form does not have the Documents subgrid but the form has Documents in Related tab (Navigation items). So, I tried to call navigateTo method passing a relationship object in pageInput parameter but it had no effect to display an associated view for Documents.

My parameters:

var pageInput = {
    pageType: "entityrecord",
    entityName: "vs360_job",
    entityId: "cb03f692-686a-e811-814e-480fcff4b171",
    relationship: { attributeName: 'regardingobjectid', name: 'vs360_job_SharePointDocumentLocations', navigationPropertyName: 'regardingobjectid_vs360_job', relationshipType: 0, roleType: 1 }
};
var navigationOptions = {
    target: 2,
    height: {value: 80, unit:"%"},
    width: {value: 70, unit:"%"},
    position: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions)

Docs:
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/navigateto


Can anyone have experience with the relationship parameter? Is it possible to implement my wish to display associated view?


Kind regards
 
I have the same question (0)
  • Verified answer
    Linn Zaw Win Profile Picture
    3,407 on at

    I think the relationship parameter is not what you think it is. I guess it is not the parameter to focus the specified associated tab of the record that you opened. I have raised an issue in GitHub of the Docs and I will get back to you when I get a response.

    https://github.com/MicrosoftDocs/powerapps-docs/issues/1589

    I do no think it is possible to implement your requirement to focus and display associated view on load of the form by navigateTo() client API. Please just consider adding the subgrid to the form and focus the tab with the subgrid onLoad() of the page by checking the formParameters passed by the navigateTo() client API. (and hide the tab if the custom formParameters is not found when the record is normally opened by the user)

  • dmitriy andreyanov Profile Picture
    5 on at
    [quote user="Linn Zaw Win"]

    I think the relationship parameter is not what you think it is. I guess it is not the parameter to focus the specified associated tab of the record that you opened. I have raised an issue in GitHub of the Docs and I will get back to you when I get a response.

    https://github.com/MicrosoftDocs/powerapps-docs/issues/1589

    I do no think it is possible to implement your requirement to focus and display associated view on load of the form by navigateTo() client API. Please just consider adding the subgrid to the form and focus the tab with the subgrid onLoad() of the page by checking the formParameters passed by the navigateTo() client API. (and hide the tab if the custom formParameters is not found when the record is normally opened by the user)

    [/quote]

    Thank you Linn,

    Just I thought that "relationship: (Optional) Object. Define a relationship object to display the related records on the form" parameter description from docs describes my wish to display related tab on a form. It seems it's not possible (sad). I investigated system js files of Dynamics 365  but I found nothing that the relationship parameter handled. Of cause, I will wait for comments in GitHub to find out about this parameter more.

    I will try to implement your offered solution

  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    I don't think this is achievable (SharePoint Documents cannot be displayed as a subgrid on a form).

    What is achievable is to display a Document Tab on your form, as documented (as a preview feature), here:
    https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/add-documents-tab-entity-main-form

    Then as Linn said, you might be able to automatically set focus on that document tab with a form script (but that might be disturbing from a user experience perspective if opening the form always defaults to that tab).
    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/setfocus

    Henry

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 55

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans