Skip to main content

Notifications

Announcements

No record found.

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

  • DiePic Profile Picture
    DiePic 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.

  • DiePic Profile Picture
    DiePic 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.

  • Verified answer
    Mohamed GRAIB Profile Picture
    Mohamed GRAIB 2,494 Super User 2024 Season 2 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

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Share Your Event with the Community

Jump start your event engagement! 📢

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,961 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,724 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans