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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Quick Create form Close from Javascript

(0) ShareShare
ReportReport
Posted on by 193

Is it possible to Close Quick Create from javascript. We can use Xrm.Page.ui.close(); to close the main form. Like that do we have any JS to close quick create without using the Mscrm.GlobalQuickCreate.GlobalQuickCreateBehavior.closeAllGlobalQuickCreateForms();

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vineet  Mehra Profile Picture
    75 on at

    I also faced this issue once and it seems like using Mscrm.GlobalQuickCreate.GlobalQuickCreateBehavior.closeAllGlobalQuickCreateForms() function is the only option as of now.
    If you get anything else, please let me know.

    NOTE : This is a system function, so any changes changes by Microsoft can affect out code or make it useless.

  • Community Member Profile Picture
    on at

    Hello Winnie,

    Thanks for reply

    It's true,

    but I am facing an issue while calling this method.

    The error is

    One of the scripts on this recording has generated an error . For more details , download the log file.

    TypeError : Unable to get property ' GlobalQuickCreateBehavior is undefined or null reference at ---

    Thanks,

    Munavvar

  • Suggested answer
    Vineet  Mehra Profile Picture
    75 on at

    Hi Munavvar,

    Not sure about your error, but it worked for me.
    Where are u calling this function, on which event ? Version of CRM ?
    I hope you already cross-checked the function name.  GlobalQuickCreateBehavior.js have all the functions related to Quick Create. File location is 

    <CRM Installation folder>/CRMWeb/_static/_controls/GlobalQuickCreate folder.

    If I get something else, will let you know.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello Winnie,

    Yes it's working.

    The problem was occurred due to CRM 2016 turbo forms.

    The Mscrm functions are not directly available inside the ClientApiWrapper.

    So we need to add "parent." before the "Mscrm" part.

    So it seems like.

    parent.Mscrm.GlobalQuickCreate.GlobalQuickCreateBehavior.closeAllGlobalQuickCreateForms()

  • Suggested answer
    Nick Plourde Profile Picture
    on at

    I am using CRM 2016 and that function does not work anymore. I simply used (parent.parent.$('#globalquickcreate_cancel_button_NavBarGloablQuickCreate')).click();

  • Steeve G Profile Picture
    on at

    Thanks! You saved me a lot of work :)

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    just be careful in the next Dyn 365 release, because this function is an unsupported customization ;)

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Balaji,

    I am agree with Guillaume Domont  , you need to implement plugin  if you want to implement some logic with id. so don't go for unsupported customization which may not work in newer release of MS.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans