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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 63 Most Valuable Professional

#2
11manish Profile Picture

11manish 23

#3
Hamza H Profile Picture

Hamza H 14 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans