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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

close active form with XrmToolBox

(0) ShareShare
ReportReport
Posted on by 448

Hi all

I've create my first personal button that run a flow and all is working, but I'm not able to close the form at end .... there is a known way to close the "Active Form"?

pastedimage1672496873375v2.png

I try with all these 3 strings ... not work....

- if (parent.opener != undefined) { window.parent.close(); } else Xrm.Page.ui.close();
- formContext.ui.close();
- Xrm.Page.ui.close();

I have the same question (0)
  • Verified answer
    Mohamed GRAIB Profile Picture
    2,504 Moderator on at
    RE: close active form with XrmToolBox

    Hi DIE,

    Try to use this :

    var attributes = Xrm.Page.data.entity.attributes.get();

     for (var i in attributes)

       {       attributes[i].setSubmitMode(“never”); }

    Xrm.Page.ui.close();

    You can follow this link :

    mylearnings26.wordpress.com/.../

    Please mark the answer as verified if that's helpful for you

  • DiePic Profile Picture
    448 on at
    RE: close active form with XrmToolBox

    Hi Mohamed GRAIB  thanks for your suggestion.

    I try it in any way, but not working.

    Even if I just use the "Xrm.Page.ui.close();" string command, nothing happens.... there is another way for sure.

  • DiePic Profile Picture
    448 on at
    RE: close active form with XrmToolBox

    Mohamed GRAIB , thanks in anyway your hint help me to search in the right way.

    I've solved in this way:

    - create a function 

    pastedimage1672663239743v1.png

    - insert in my personal button (with "add action)

    pastedimage1672663376739v2.png

    This is working for me.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 152 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 103

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 74

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans