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 :
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

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 April Top 10 Community Leaders

These are the community rock stars!

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

#1
FSRon Profile Picture

FSRon 75

#2
James White Profile Picture

James White 21

#3
AT-28040446-0 Profile Picture

AT-28040446-0 20

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans