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 :
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();

  • Verified answer
    Mohamed GRAIB Profile Picture
    2,508 Moderator on at

    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

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 93 Super User 2026 Season 2

#2
Travis South Profile Picture

Travis South 67

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans