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)

Angular webresource

(0) ShareShare
ReportReport
Posted on by 2

Hi,

We created an angular application and want to show it via the menu item.

This works fine, the app is displayed (via Xrm.Internal.Dialogs).
However, we cannot make the cancel button working.
One cannot use window.close as the window is not created by the script, but on the other hand, closeWindow as foreseen gives a build error in angular.

Has anyone experience with this kind of situations, and could help us how to implement a cancel button in Angular?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Birgit,

    you have to include ClientGlobalContext.js.aspx.

    If you never do it before, refer to the following page:

    http://crm2011developersblog.blogspot.it/2012/07/different-ways-to-refer.html 

    Please let me know if you solve.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Verified answer
    Birgit RD Profile Picture
    2 on at

    A late reply to my question.

    As both answers indicated, a reference to ClientGlobalContext.js is necessary.

    However, for Angular you need to add a "dummy declaration"in the component (or whatever) that calls this script.

    In my case "declare function closeWindow(par1: boolean): any;".

    This solved my issue (with many thanks to a colleague who helped me out).

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