cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KASCHN
Helper I
Helper I

Refresh underlying form from Custom Page

I have a custom page launched when a model driven app form is loaded. This page updates data on the underlying form. Is there a way to refresh the underlying form (on close or otherwise)? Say, something that is similar to ModelDrivenFormIntegration.Refresh()?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @KASCHN , 

 

That is correct. The Xrm.NavigateTo(...).then(formContext.data.refresh) should be a good way to refresh the data on the form,

 

I must say, that when I did the test a few months ago, I didn't had to refresh the form, because it was automatically refreshed.

How do you close the CustomPage using PowerFx? If using the recommended "Back()" doesn't refresh the form, you could use the "Navigate(Lookup)". That will refresh the form too. 

 

https://docs.microsoft.com/en-us/power-apps/maker/model-driven-apps/page-powerfx-in-model-app?WT.mc_...

 

Hope this helps!

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

2 REPLIES 2
KASCHN
Helper I
Helper I

I think this is correct? Please confirm:

        Xrm.Navigation.navigateTo({
            pageType: "custom",
            name: worksheetName,
            entityName: entityName,
            recordId: recordId,
        }, {
            target: 2,
            position: 2,
            width: { value: 75, unit: "%" },
            title: "Enter Results Worksheet",
        }).then(() => {
            console.log("success");
            formContext.data.refresh();
        }, (e) => console.log(e));

Hi @KASCHN , 

 

That is correct. The Xrm.NavigateTo(...).then(formContext.data.refresh) should be a good way to refresh the data on the form,

 

I must say, that when I did the test a few months ago, I didn't had to refresh the form, because it was automatically refreshed.

How do you close the CustomPage using PowerFx? If using the recommended "Back()" doesn't refresh the form, you could use the "Navigate(Lookup)". That will refresh the form too. 

 

https://docs.microsoft.com/en-us/power-apps/maker/model-driven-apps/page-powerfx-in-model-app?WT.mc_...

 

Hope this helps!

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Kudoed Authors
Users online (1,977)