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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

window.parent.location.reload(true).How it works?

(0) ShareShare
ReportReport
Posted on by

What is the use of window.parent.location.reload(true) and how it works?

Window.location.reload(true); is not working.

I have the same question (0)
  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    This method is uesd to feresh the parent form and it is a normal JS menthod, we do not recommend you to use normal js in D365 form.

    If you want to refresh form in D365 form, you could use the following ways.

    1. formContext.data.refresh(save).then(successCallback, errorCallback);

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-data/refresh

    2.Xrm.Navigation.openForm

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openform

    Hope it helps.

    Best Regards,

    Leo

  • Community Member Profile Picture
    on at

    Hi,

    I used openForm to relaod the page but the BPF is not displaying.

    pastedimage1578652108414v1.png

    var formContext = executionContext.getFormContext();
    var entityFormOptions = {};
    entityFormOptions["entityName"] = "knowledgearticle";
    entityFormOptions["entityId"] = formContext.data.entity.getId();

    // Open the form.
    Xrm.Navigation.openForm(entityFormOptions).then(
    function (success) {
    console.log(success);
    },
    function (error) {
    console.log(error);

    Thanks.

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    I tried the same code in my instance and it worked well.

    pastedimage1578886399640v1.png

    function openFormWithBPF(executionContext) {
        var formContext = executionContext.getFormContext();
        var entityFormOptions = {};
        entityFormOptions["entityName"] = "new_customtestentity";
        var id = formContext.data.entity.getId();
        entityFormOptions["entityId"]=id.substring(1,id.length-1);
        //entityFormOptions["entityId"]="34B4E699-8432-EA11-A810-000D3A579C9D";
        //entityFormOptions["processId"]="1b3844a3-25e9-42f4-aade-53af15108d1f";
        // Open the form.
        Xrm.Navigation.openForm(entityFormOptions).then(
            function (success) {
                console.log(success);
            },
            function (error) {
                console.log(error);
            })
    }

    Please confirm that did you add the BPF to your app first? Could you share more details about your situation?

    Best Regards,

    Leo

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Did you resolve your problem? If so, please mark the answer as verified to close this thread to help other users with similar issues.

    Best Regards,

    Leo

  • Community Member Profile Picture
    on at

    I don't see how this answers the question.  This formcontext method is for the current form not a quick create form's parent, right?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans