Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

(0) ShareShare
ReportReport
Posted on by 3,755

We have workflows that execute onSave. What it does is create a new record in a separate entity during the saving of a form. How do I overcome the limitation in CRM 2013, as I am aware that the record saves automatically every 10 - 15 seconds, so we'll end up having multiple records created. We're also taking a huge performance hit.

Any ideas?

*This post is locked for comments

  • Suggested answer
    Anjali Raj Profile Picture
    on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    Hussman,

    Since the Save event triggers on both auto save and explicit save, a way has been provided to differentiate whether the Save event is being triggered by autoSave or explicit save. A new "Auto Save" mode with an unique value of 70 has been added to the CRM SDK so that the getSaveMode() can return a specific value for ISVs to use. Refer to CRM 2013 SDK for more information about the existing method in CRM 2011.

    If you want to enable auto save for your organization but disable it for specific entity forms, you can add code to the OnSave event to prevent auto save from occurring for that form only.You can use function preventAutoSave(econtext) and add it as web resource for that specific form.

    Refer - http://msdn.microsoft.com/en-us/library/gg509060.aspx#BKMK_GetSaveMode

  • AndrewCampey Profile Picture
    on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    When you say "create a new record in a separate entity during the saving of a form" what are the conditions on this?

    I would have thought that you could do the Workflow when the record is created. Otherwise set the workflow to start only when a particular field changes.

    If you can restrict when the workflow starts then the performance hit/auto save should be irrelevant I would have thought.

  • Thomas Unzeitig Profile Picture
    364 on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    I think the only option for you is to turn autosave off.

    if you want to turn it off only in one entity use this code:

    soho.at/.../microsoft-dynamics-crm-2013-prevent-a-record-from-being-saved

  • jlattimer Profile Picture
    24,560 on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    Really depends on what you are doing. A potential option is to create an additional boolean field to indicate your new record has been created or not. In the workflow once you've created the new record set the field to true. Include a check condition in the beginning of the workflow to only run if the value is false.

  • Hussman Profile Picture
    3,755 on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    Thanks guys, trying to workout what the logic would be in a workflow to trigger only once when out of the form. Any ideas?

  • Suggested answer
    jlattimer Profile Picture
    24,560 on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    Like Peter mentioned, you could turn off auto save or you could add additional check conditions to your workflow to ensure it only fires once.

  • Peter Hale - QLD Profile Picture
    480 on at
    RE: CRM 2013: workflows set to execute on save are firing - what's the best strategy to overcome this?

    You can turn autosave off

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans