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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Model Driven App: Form...
Power Apps
Unanswered

Model Driven App: Form Logic - use JS to react on content in quick view form

(0) ShareShare
ReportReport
Posted on by 254

Dear community, 

yesterday I struggles heavily by building a simple JS script. Meanwhile I'm not even sure if the idea can be implemented at all, so I hope for your suggestions. 

I have 2 entities A and B. At A there is a boolean, let's name it "isValidForX". 

There is a 1:N relation between A and B (for 1 A there can me many B). 

 

At main form of B I would like to have a field visible depending which record of A is selected, or to be more precise dependent on "isValidForX" property of selected record from A. As far as I know to have JS magic all information I would like to check for must be at the form itself. So I created a little quick view form at Entity A having this bool contained. I've added this form at main form of B. 

So far so good. If I now do any selection at B for my relation to A I can see the correct value of the isValidForX field inside the quick view form. 

But if I try to get it's value it is always null. I did it step by step so I'm sure I have the right objects identified. I'm afraid the problem is a timing issue. My script runs onLoad of main form B and probably while rendering the whole form. So I guess the execution is finished before the system read the relation to record A and as consequence the value to be displayed in the quick view form is simply not yet present. 

Any idea how to avoid this?

Are there other options in place to get the needed value? I already thought of having a fetchXML getting the data but did not tried so far. 

 

Any suggestion welcome!

Thanks in advance

Stefan 

I have the same question (0)
  • Ram Prakash Duraisamy Profile Picture
    5,785 Super User 2026 Season 1 on at

    Hi @SteRe 

     

    I think you are facing timing issue. you can give a try for Xrm.Page.data.refresh().

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Follow me on Twitter : @rampprakashd
    Blog : https://microsoftcrmtechie.blogspot.com

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 Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,070

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 608

Last 30 days Overall leaderboard