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)

Re: Workaround for Campaign Response to Lead

(0) ShareShare
ReportReport
Posted on by

Hi There,

I have researched the forums as I have encountered an issue with mapping Campaign Responses to Leads or Contacts using Custom fields. However I see that this functionality does not seem to be provided out of the box. Here is what I would like to accomplish:

- I have a custom form named 'Event Attendees' under Campaign Responses which has been customized with my own fields:

EventAttendees.png 

However when I attempt to convert this to a Lead or Contact, I only take the default mapped fields with me e.g. Customer, Company Name, Last Name etc...

I have read that a way to overcome this is to use ribbon workbench. Replace the 'Convert Campaign Response' button with my required buttons 'Convert to Lead' and 'Convert to Contact'.

Then I can simply create a JavaScript file which takes the fields to be mapped as parameters and simply map them to the Lead.

Basically I was wondering if this is the correct way to go about this and if anyone could point me in the right direction be it tutorials, advice etc.. for setting up the buttons and applying the JavaScript so that the mappings occur, I would be extremely grateful. Thanks for your time.

*This post is locked for comments

I have the same question (0)
  • Aileen Gusni Profile Picture
    44,524 on at
    RE: Re: Workaround for Campaign Response to Lead

    Rory,

    Try to use plugin..

    Seems like this functionality still not working.

    Thanks

  • Community Member Profile Picture
    on at
    RE: Re: Workaround for Campaign Response to Lead

    I will try a plugin and let you know how I get on thanks

  • Community Member Profile Picture
    on at
    RE: Re: Workaround for Campaign Response to Lead

    Okay Aileen,

    I wasn't to sure on what to do with the plugin so, so far I have:

    •  Created two buttons in Ribbon Workbench called 'Convert to Lead' and 'Convert to Contact'
    • I have created a web resource with some Javascript which calls Xrm.Utility.openEntityForm("lead"); which opens the lead entity once the 'Convert to Lead' button is clicked.

    Now I am trying to map the fields from my Campaign Response form 'Event Attendees' to my Lead creation Form but I am not having any success.

    an example of the code I am using is:

    function ConvertLead () {

    Xrm.Utility.openEntityForm("lead");

    Xrm.Page.getAttribute("firstname").setValue("RORY TEST");

    }


    This throws an error saying that getAttribute is null when I am certain this is an existing and displayed field on the form. Any idea if my methodology is okay?

    Also I tried changing openEntityForm to openQuickCreate and I was getting just errors yet openEntityForm works perfect?

    Thanks in advance,

    Rory

     

  • Aileen Gusni Profile Picture
    44,524 on at
    RE: Re: Workaround for Campaign Response to Lead

    Rorry,

    In this javascript:

    Xrm.Utility.openEntityForm("lead");

    You need to pass not only "lead"

    Example:

    Xrm.Utility.openEntityForm("account", null, parameters);

    crmbusiness.wordpress.com/.../crm-2013-let-xrm-utility-openentityform-open-crm-forms-for-you

    Btw, I suggest you to use standard function but you can tweak the plugin.

    So, every time the Lead or Contact is created from Campaign Response, it will have link lookup to Campaign Response.

    Then you can use precreate plugin to get all fields from Campaign response to the newly created Lead. This plugin to intercept the process flow.

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
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans