Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Twilio SMS generation activity throwing Invalid Operation Exception

(0) ShareShare
ReportReport
Posted on by 5

Hello,

Twilio solution for sending SMS to the customer in Field Service module is not working as expected.
The SMS needs to be sent to the customer when the Booking is set to In Progress and Completed.

We are seeing the below error 

Plugin Trace:

 

[Microsoft.Dynamics.TwilioIntegration.TwilioWFA: Microsoft.Dynamics.TwilioIntegration.TwilioWFA.TwilioSMSGenerationActivity]

[Twilio: Twilio SMS Generation]

 

Error Message:

 

Exception type: Microsoft.Crm.CrmException

Message: Invalid Operation

   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__DisplayClass8_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 --

 

Has anyone faced this before. If Yes, Any feedback would be very helpful.

Thanks

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 > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans