Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Maximum records can be created from c# plugin in CRM online ?.

(0) ShareShare
ReportReport
Posted on by 290

I have a scenario on the update of one field in A entity my plugin will trigger and create B entity1 record also creates around 250 C entity records related to B. If i am running for 1 A entity record it works fine but for 5 or more time out error occurs for the plugin(I have tries Async and sync).

Thanks in advance

  • Jomy Jose Profile Picture
    Jomy Jose 290 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    I got the issue, an autonumber solution plugin was triggering on the creation of the record. i have deactivated the step, and now my plugin works fine

  • Verified answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    Yes, There is no time limit for workflow.

  • Jomy Jose Profile Picture
    Jomy Jose 290 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    Did custom workflow will not get timeout error ? will it execute more than 2 minutes

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    You are getting two minute limit error.

    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): Xrm.Plugin.GenerateInspectionDetails.GenerateInspection: System.TimeoutException: Couldn’t complete execution of the Xrm.Plugin.GenerateInspectionDetails.GenerateInspection plug-in within the 2-minute limit.

    Please check your code and analyse why it is taking too much time. If your code is fine then move to custom workflow.

  • Jomy Jose Profile Picture
    Jomy Jose 290 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    Please find below,

    Plugin Trace:

    [Xrm.Plugin.GenerateInspectionDetails: Xrm.Plugin.GenerateInspectionDetails.GenerateInspection]

    [2f6dc0c9-8dc0-e811-a845-000d3a290c6b: Xrm.Plugin.GenerateInspectionDetails.GenerateInspection: Update of md_unithandover]

    Entered Xrm.Plugin.GenerateInspectionDetails.GenerateInspection.Execute(), Correlation Id: 17e589d0-c4fc-4fd1-bcca-ecfce41ecaa0, Initiating User: 7d694971-2ddb-e711-8127-e0071b6e68f1

    Error Message:

    Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): Xrm.Plugin.GenerateInspectionDetails.GenerateInspection: System.TimeoutException: Couldn’t complete execution of the Xrm.Plugin.GenerateInspectionDetails.GenerateInspection plug-in within the 2-minute limit.

      at Microsoft.Crm.Sandbox.SandboxCodeUnit.ProcessException(Exception originalException, IExecutionContext context, SandboxClient client, SandboxCallTracker callTracker, Boolean isSafeToRetry, DateTime performanceExecutionStartTime, SandboxTracker tracker, Guid parentExecutionId, CrmException& crmException, String& assemblyContents)

      at Microsoft.Crm.Sandbox.SandboxCodeUnit.<>c__DisplayClass24_0.<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.CrmProvider.RemotePlugin.Execute(IServiceProvider serviceProvider)

      at Microsoft.Xrm.RemotePlugin.CrmProvider.RemotePluginContainer.Execute(IServiceProvider serviceProvider)

      at Microsoft.Crm.Asynchronous.EventOperation.InvokePlugin(AsyncExecutionContext context, IPlugin pluginInstance)

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    Please share error that you are receiving from plugin.

  • Jomy Jose Profile Picture
    Jomy Jose 290 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    Thanks for your quick response.

    But here i have a scenario to create records based on master data. it will creates record based on some condition and around 250 records will be created. If I trigger this plugin(Bulk update of particular field) for 4 records it works fine but more than that will cause timeout error. If the plugin is Async, each execution will be separate then how the plugin getting time out error if i run it for more than 4 ?

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Maximum records can be created from c# plugin in CRM online ?.

    You can create N numbers of record from plugin in 2 minutes.

    Actually plugin timeout is 2 minutes(Sync and Async).

    If you have long code that execute in more than 2 minutes then you will receive error.

    Better to try workflow.

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans