WordPress.org

Ready to get started?Download WordPress

Forums

WordPress-to-lead for Salesforce CRM
[resolved] %URL% character limit on Lead Source Field!? (3 posts)

  1. adsleeblythe
    Member
    Posted 10 months ago #

    Only the first 40 characters of my Lead Source %URL% is being captured. Not ideal when my URLs are longer than 40 characters.

    Is there a way to increase the character limit for the Lead source field?

    Thanks

    http://wordpress.org/extend/plugins/salesforce-wordpress-to-lead/

  2. Nick Ciske
    Member
    Plugin Author

    Posted 10 months ago #

    That's set on the SalesForce side, it has nothing to do with the plugin (it just posts the data, SalesForce truncates it).

    Apparently not...
    https://success.salesforce.com/questionDetail?qid=a1X30000000KwbMEAS

    You could use a custom field, but I can't remember if the %URL% macro works there or not...

  3. FGarcia@technologycustoms.com
    Member
    Posted 8 months ago #

    Nick, adsleeblythe,

    Not sure if you guys ever got an answer, but I did a quick method for us to work.

    First, the %URL% variable will NOT work in any custom field.

    Second, In Salesforce.com, add a field for your URL to be stored (set to 255 text length.)

    You'll notice a 15 digit code assigned to the field. (When you export the HTML from SalesForce, it is the "id" of that field).

    In the SF plugin, on your form, create a field. The field name should be the 15 character code from above. Enable the field, and make it required, and HIDDEN. Name it something, and put something into the default value field (anything is fine, this will be completely replaced.)

    Move on to the Plugins > Editor > and edit the main (salesforce-wordpress-to-lead/salesforce.php) file.

    Search for the following string:
    $post['lead_source'] = str_replace('%URL%','['.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].']',$options['forms'][$form_id]['source']);

    Right below that, add the following snippit:
    $post['00N40000006Wg4i'] = '['.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].']';

    Notice that my code is "00N40000006Wg4i", MAKE SURE YOU REPLACE THIS WITH YOUR OWN!

    Save the file and that should do it!

Reply

You must log in to post.

About this Plugin

About this Topic