Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

(0) ShareShare
ReportReport
Posted on by 1,086

Hi, I use this method Xrm.Navigation.navigateTo() to open a webresource html and inside this resource I've tried to get the form context
like

parent.Xrm.Page.data

Xrm.Page.data

window.Xrm.Page.data

pastedimage1629259012586v1.png

to be able to acces form properties but that object is always NULL, Xrm has data though

pastedimage1629259083781v3.png

thanks

  • RE: How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

    please go to check window index.

    example:  parent[0].Xrm.Page.getAttribute;  parent[1].Xrm.Page.getAttribute;   parent[3].Xrm.Page.getAttribute  ....

  • Suggested answer
    PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

    I ended up doing like this blog Get formContext in navigateTo web resource basically saving the formContext in a custom global variable e.g.: window.parent.customVariable and calling it inside the web resource.

  • PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

    nothing seems to work I neet to get a form value and need to acces to the form controls but I can't, below what I've tried 

    pastedimage1631138765562v1.png

  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

    Hi,

    Please try below highlighted options.

    pastedimage1630867208418v1.png

    Thanks,
    Pradeep.

    Please mark this as VERIFIED it it helps.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to use Xrm.Page.data in Xrm.Navigation.navigateTo?

    Hi,

    I have tested it on my side, it seems that Xrm.page.data can't work in this situation.

    You can try to add data parameter in the pageInput object to pass value.

    Please refer to this:

    Prepopulating Data in Form when opening form using Xrm.Navigation.navigateTo - Unified Interface Forum Community Forum (dynamics.com)

    navigateTo (Client API reference) in model-driven apps - Power Apps | Microsoft Docs

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans