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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Cloning records and Calculated Fields Recalculate Automatically

(0) ShareShare
ReportReport
Posted on by 9
I am working with cloning records. In my example, I am cloning a bunch of records using the new workflow utility. This works fine, except the cloned records have calculated fields on them that require a re-save after create (the calculated fields on the cloned records are blank until then). Does anyone know of a way to force a record recalculate automatically? 

*This post is locked for comments

I have the same question (0)
  • Hankanman Profile Picture
    on at

    Hi Weldarb, I have exactly the same issue, did you find a solution? Ill post here if i figure it out.

  • BharatPremji Profile Picture
    2,485 on at

    Hi,

    Have a look at this set of custom workflow activities:

    msdyncrmworkflowtools.codeplex.com

    There is a Force Calculate Rollup Field step in the solution

    Regards

    Bharat

  • Hankanman Profile Picture
    on at

    Will this work for calculated fields as well as rollups then?

  • ashlega Profile Picture
    34,477 on at

    Hi Wal,

      are those calculated or rollup fields?

        https://msdn.microsoft.com/en-us/library/dn817863.aspx#BKMK_Calculated

        "Calculated attributes are calculated in real-time when they are retrieved."

      

    What does it look like - how do you know they are empty? 

      

      

  • Hankanman Profile Picture
    on at

    Because the record is being 'cloned' ie created by a workflow, the calculation isn't performed. You can see this by running an advanced find on the cloned records and the calculated field will be shown blank, and subsequently you cannot run any other workflows against that field because its blank.

    Yes the field is calculated when it's retrieved but that only seems to mean 'when someone opens the record' as soon as you open a cloned record fully, the field is calculated.

    This presents a problem because it means you can't clone records because resulting calculated values will always be blank, unless you force the user to open the record.

  • ashlega Profile Picture
    34,477 on at

    I asked that question because I tried exactly that scenario, but, admittedly, in 365.. If I use a workflow to create a record which has a calculated field, that field seems to be populated correctly.

  • ashlega Profile Picture
    34,477 on at

    I'm wondering, then.. what if you  registered a workflow to run "oncreate" of those entities? That would be an equivalent of having a "retrieve", and you don't need to do much there (maybe just add a step to stop the workflow..)

  • Hankanman Profile Picture
    on at

    Hi Alex, I tried that and as an on-demand, doesn't trigger the calculation, im on dynamics 2016 on-prem, hopefully we will be on dynamics 365 on-prem by end of next week

  • Suggested answer
    Inogic Profile Picture
    682 on at
    Hi Weldarb,

    While the new workflow utility in Dynamics 365 CRM doesn't natively trigger a recalculation of cloned record fields, here are two approaches to achieve this:

    1. Workflow with Update Step (Simple Scenario):
    This method works well if the calculated field formula is relatively straightforward and doesn't involve complex dependencies.
    • Create a workflow that triggers on record creation (of the entity being cloned).
    • Within the workflow, include an "Update Record" step targeting the newly cloned record.
    • In the update step, map a dummy field (e.g., a hidden text field) to any value (e.g., "trigger recalculation"). This minor change will trigger recalculation of all formula-based fields on the record.
    2. Click2Clone app by Inogic [Certified Software on Microsoft AppSource]:
    Checkout Click2Clone app by Inogic for cloning Dynamics 365 CRM records, it can help you automatically clone records with their calculated fields. With Click2Clone, you can clone Dynamics 365 CRM records for Dynamics 365 CRM entities (OOB or Custom). You can effortlessly create multiple copies of any given CRM record, along with their related child records. This way, the app saves you time by automating the process of manually cloning records.
    Here are the key features of the Click2Clone app:
    • One Click Cloning: Clone existing records along with their notes, attachments, and custom fields with just a click of a button.
    • Automate Cloning: Set up workflows to clone records automatically based on your needs.
    • Clone Records Across Entities: Easily clone records from one entity to another (e.g., Opportunity) to another (e.g., Order).
    • Deep Clone Hierarchies: Clone entire groups of related records at once, ensuring data accuracy.
    • Copy Child Records: Quickly copy related/associated child records within the same entity.

    There is much more to Click2Clone’s amazing features.

    If you are interested in trying the app for your CRM record cloning needs, then you can get it for a 15-day free trial from our Website or Microsoft AppSource.
     
    Thanks,
    Sam

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans