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

  • Verified answer
    Birgit RD Profile Picture
    2 on at
    RE: Angular webresource

    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).

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Angular webresource

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans