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 :
Customer experience | Sales, Customer Insights,...
Answered

Read parent window's values in a child window

(0) ShareShare
ReportReport
Posted on by 25

How can I read parent window's fields and pass it to a web resource in a child window (Modal)?

Something like below,

pastedimage1587136344880v1.png

I need to read about 10 fields and use it in web resource.

I can retrieve with a service call, but just checking if i can read directly using getAttribute.

Tried few methods like this - window.opener.parent.Xrm.Page.getAttribute("myfield").getValue()

Thanks in advance.

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I would highly recommend to use WebApi to get the data. If you anyway want to get the data using DOM you should try to use window.parent.Xrm... to get the data.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    If my reply answered your question take a minute and verify my reply as an answer by clicking "Yes" under message "Does this answer your question?".

  • Sudharshini Profile Picture
    25 on at

    @Andrew, Any thoughts on how to refresh the parent form through javascript while closing the modal dialog?

  • Verified answer
    Marco.P Profile Picture
    2,405 on at

    Can't you just add Xrm.Page.data.refresh(); on callback of the Xrm.Navigation.navigateTo function?

    Something like this:

    Xrm.Navigation.navigateTo(INPUT).then(

       function success() {

               Xrm.Page.data.refresh();

       },

       function error() {

               // Handle errors

       }

    );

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    There are few ways on how you can do that:

    docs.microsoft.com/.../refresh

    docs.microsoft.com/.../openform

  • Sudharshini Profile Picture
    25 on at

    Thanks, this worked.

  • Sudharshini Profile Picture
    25 on at

    How do we pass the return value from webresource to success callback?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    The only easy way of doing it I found was usage of sesionStorage/localStorage. If you want to see the way I do it - I have a post/video scheduled for this week where I will demonstrate how I do it. So if you don't want to miss it - subscribe to my blog and youtube channel.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans