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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Update Campaign Response with related Contact information

(0) ShareShare
ReportReport
Posted on by

In MS CRM Online, we are attempting to populate new fields on old forms based on an explicit relationship between Campaign Response and Contact. We've written a plugin to update the Campaign Response record based on the Customer value, populating a Contact and Account field on CR. However, we would like to apply not only this plugin but also a workflow that populates 2 fields with the Customer's first name and last name, based on a relationship between Campaign Response and Contact. 

It seems that the workflow Update step happens after the save function in CRM, so the workflow updating the 2 text fields (FN, LN) fail to trigger the plugin that creates a relationship between Campaign Response and Contact. 

How can we mass edit & update these Campaign Response records to (1) trigger our plugin (runs onSave & onCreate) and (2) trigger a workflow that updates Campaign Response text fields with Customer FN & LN (based on plugin's creation of CR:Contact relationship)?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Update Campaign Response with related Contact information

    Plugin definition: onSave of Campaign Response, if type(Customer)=Contact, populate Contact & Contact's parent Account lookup fields (custom-added) on CR form; if type(Customer)=Account, just populate parent Account field with that Account.

    The problem is that the plugin is triggered by a form save, but CRM workflows save directly to the SQL database rather than through the UI. For this reason, whether the workflow runs manually or onChange of a field, the plugin will not execute after the workflow runs. Bulk Edit also saves directly to SQL database, bypassing the plugin's trigger.

    Our goal is to allow the user to be able to manually update historical data in bulk, which is why we've attempted this function with a workflow rather than adding it to the plugin.

  • Suggested answer
    Hosk Profile Picture
    on at
    RE: Update Campaign Response with related Contact information

    This all sounds confusing

    What triggers the workflow to run, why don't you temporarily change it to run on demand and then run it manually on all the records.

    What fields is the plugin being triggered on, a few of the fields or all of them.  

    Maybe you can create a workflow to update the campaign response, update a field you don't use much or set a field to the same value.  This should trigger the plugin (depending on what fields the plugin is set to be triggered on).

    IS the plugin being triggered but not saving anything?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans