Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Unanswered

Export Document Template as Pdf Error

Posted on by 10

Hello, 

My organisation exports document templates as Pdf files and attaches them to emails. 

In the last few days, however, these exports have been throwing errors. I've made no changes but it's suddenly stopped working in all environments.

Here's the piece of code it fails on. Is anyone else having issues with ExportPdfDocument requests? 

pastedimage1633416673108v1.png

Here's the stack trace: 

Exception type: Microsoft.Crm.CrmException
Message: Object reference not set to an instance of an object.
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricClientTelemetryInterceptor.<>c__DisplayClass3_0.<Intercept>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricClientTelemetryInterceptor.Intercept(IInvocation invocation, IExecutionContext context, SandboxFabricCallTracker sandboxFabricCallTracker)
at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricCodeUnitExecuteBaseInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ISandboxFabricCodeUnitProxy.Execute(ILifetimeScope scope, IExecutionContext context, SandboxFabricCallTracker& sandboxFabricCallTracker)
at Microsoft.Xrm.RemotePlugin.Client.SandboxFabricPlugin.<>c__DisplayClass5_1.<Execute>b__3()
at Polly.Policy.<>c__DisplayClass150_0`1.<Execute>b__0(Context ctx, CancellationToken ct)
at Polly.Policy.<>c__DisplayClass143_0`1.<ExecuteInternal>b__0(Context ctx, CancellationToken ct)
at Polly.RetrySyntax.<>c__DisplayClass12_1.<WaitAndRetry>b__1(Context ctx, CancellationToken ct)
at Polly.Retry.RetryEngine.Implementation[TResult](Func`3 action, Context context, CancellationToken cancellationToken, IEnumerable`1 shouldRetryExceptionPredicates, IEnumerable`1 shouldRetryResultPredicates, Func`1 policyStateFactory)
at Polly.RetrySyntax.<>c__DisplayClass12_0.<WaitAndRetry>b__0(Action`2 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.ExecuteInternal[TResult](Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute[TResult](Func`3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute[TResult](Func`1 action)
at Microsoft.Xrm.RemotePlugin.Client.SandboxFabricPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Xrm.RemotePlugin.Client.ResilientSandboxPlugin.<>c__DisplayClass13_1.<Execute>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Xrm.RemotePlugin.Client.ResilientSandboxPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.RemotePluginExecute(IServiceProvider serviceProvider, ILifetimeScope lifetimeScope, IExecutionContext executionContext, ILogger logger)
at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Workflow.Services.ProxyCustomActivity.Execute(CodeActivityContext executionContext)
-- End stack trace --

Any help would be much appreciated. 

thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans