cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

[Dynamics 365] No refresh on detail screen when using global variable for the displayed item

Hi everyone,

 

I am currently building an app to browse, display and edit appointments linked to Dynamics 365. I just generated a 3-screen app from the appointment entity.

 

Appointment detail screenAppointment detail screen

  1. Item = BrowseGallery1.Selected on detail screen

    By default with the 3-screen generated app, on the gallery we have this formula for the OnSelect event :

     

    Navigate(DetailScreen, ScreenTransition.None)

    For the detail screen, we have this for the Item field :

     

    BrowseGallery1.Selected

    With this, everything is fine. When I edit the appointment record, I can immeditatly see the modifiations on the detail screen after validating :

     

    Detail screen after modification with Item = BrowseGallery1.SelectDetail screen after modification with Item = BrowseGallery1.Select

    This is fine. Thing is that I would like to use the appointment detail screen also when coming from another gallery than BrowseGallery1. Seems pretty easy, all I have to do is this :

     

  2. Item = appointment (global variable) on detail screen

    For each gallery which navigates to the detail screen, let's put this on OnSelect event :

    For our first gallery :

    Set(appointment, BrowseGallery1.Selected);
    Navigate(DetailScreen, ScreenTransition.None)


    For our second gallery :

    Set(appointment, BrowseGallery2.Selected);
    Navigate(DetailScreen, ScreenTransition.None)

    etc...

    For the detail screen, let's put this in the Item field :

     

    appointment

     


    This does work pretty well. The detail screen displays the right information when coming from a gallery.
    Problem is : when I modify the apointment with the edit screen, the detail screen does not display the refreshed data. I actually have to go back to the gallery with the previous button, select the record to navigate once again to the detail screen to have the data refreshed :

    detail screen with Item = appointment (global variable)detail screen with Item = appointment (global variable)

Any idea on this ? Any workaround ?

 

Thank you very much,

 

Regards,

 

Max

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi everyone,

 

Okay, finally I just found a workaround for this.

 

In the detail screen, just put this in the Item field :

 

LookUp(Appointments; activityid = appointment.activityid)

And it will work.

Regards,

 

Max

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

No idea on this one ? I tried to do some kind of Refresh, or another Set(appointment, BrowseGallery1.Selected) on OnSucess event of the editForm, but it does not solve the problem Smiley Embarassed

 

Regards,

 

Max

Anonymous
Not applicable

Hi everyone,

 

Okay, finally I just found a workaround for this.

 

In the detail screen, just put this in the Item field :

 

LookUp(Appointments; activityid = appointment.activityid)

And it will work.

Regards,

 

Max

This was one of my last bugs to iron out before release.  Thanks 🙂

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,386)