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

Community site session details

Session Id :
Dynamics 365 Community / Forums / Sales forum / Unable to fetch record...
Sales forum

Unable to fetch record from dynamics 365 using angular 8

(0) ShareShare
ReportReport
Posted on by 319

Hello Experts,

I'm working on a project using the angular 8. in that project. I'm trying to access current logged in user using the angular 8 but getting the error... I'm pasting the screenshots for the steps which I followed.

1. I added the ClientGlobalContext.js.aspx into the index.tml file.

3386.Capture.PNG

2. Second installed types/xrm library using the npm install –save @types/xrm command. after installing the successfully I got the xrm folder kindly have a look below screen shot.

1104.Capture1.PNG

3. Now added the xrm into the tsconfig.app.json have look below screen shot

2451.Capture2.PNG

4. Now finally trying to get logged in user kindly have a look below screen show

0181.Capture3.PNG

5. I have build the solution using ng serve and uploaded files over the dynamics 365. but getting an error in below screen shot

pastedimage1568889528443v2.png

ncs_vendor-es2015.js:43414 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: '%7B637044818810008031%7D/webresources/new_index.html'
Error: Cannot match any routes. URL Segment: '%7B637044818810008031%7D/webresources/new_index.html'
at ApplyRedirects.noMatchError (ncs_vendor-es2015.js:87874)
at CatchSubscriber.selector (ncs_vendor-es2015.js:87838)
at CatchSubscriber.error (ncs_vendor-es2015.js:96878)
at MapSubscriber._error (ncs_vendor-es2015.js:93928)
at MapSubscriber.error (ncs_vendor-es2015.js:93908)
at MapSubscriber._error (ncs_vendor-es2015.js:93928)
at MapSubscriber.error (ncs_vendor-es2015.js:93908)
at MapSubscriber._error (ncs_vendor-es2015.js:93928)
at MapSubscriber.error (ncs_vendor-es2015.js:93908)
at TapSubscriber._error (ncs_vendor-es2015.js:101015)
at resolvePromise (new_polyfills-es2015.js:4032)
at resolvePromise (new_polyfills-es2015.js:3989)
at new_polyfills-es2015.js:4093
at ZoneDelegate.invokeTask (new_polyfills-es2015.js:3626)
at Object.onInvokeTask (ncs_vendor-es2015.js:73266)
at ZoneDelegate.invokeTask (new_polyfills-es2015.js:3625)
at Zone.runTask (new_polyfills-es2015.js:3403)
at drainMicroTaskQueue (new_polyfills-es2015.js:3794)

Please suggest me to resolved the error... Thanks in advance

Categories:
I have the same question (0)

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Sales

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans