Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

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

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

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans