• Resolved ddoddsr

    (@ddoddsr)


    I want to add a field for the Account ID to map to the account for all contacts.

    But I don’t see the field in the object lookup. What am I missing? I see the field I added with the field_foo example but don’t see these:

    How do I set the object: user ?

    add_filter( ‘object_sync_for_salesforce_wordpress_object_data’, ‘add_data’, 10, 1 );
    function add_data( $wordpress_object ) {
    $wordpress_object[‘account_id’] = ‘–record_id_for account–‘;
    return $wordpress_object;
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathan Stegall

    (@jonathanstegall)

    I don’t think I understand your question. Are you saying you don’t see the Account ID field as an option that you can map? And are you saying that you want a field in WordPress – called “account_id” to be populated with a value from Salesforce?

    If so, that’s the correct hook. What other info do you need?

    Thread Starter ddoddsr

    (@ddoddsr)

    I don’t see the Account ID field as an option that you can map.

    I was expecting to have a wordpress object mapping field ‘account_id’ that I would map to the Contact’s Account ID.

    And are you saying that you want a field in WordPress – called “account_id” to be populated with a value from Salesforce?

    No, the value in account_id to populate a field in Salesforce

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Are you saying you’ve added a meta field called Account ID to WordPress and you want to push its data to Salesforce? If so, to see it as an option that you can map, you need to:

    1. Make sure there is at least one record that has a value for this field
    2. Clear the plugin cache

    If this doesn’t work, it’s possible that you are using a meta solution that this plugin doesn’t support. There are so many different ways of doing metadata, but this plugin does focus on those that behave closely to the WordPress core methods.

    Thread Starter ddoddsr

    (@ddoddsr)

    No did not add a meta field, I read the hook documentation as being able to set a “virtual” field and value to map to Salesforce… A field that wordpress doesn’t care about.

    Similar to the method used in the foo_field example to add a mapping field on the WP side.

    I’ll just populate a real field and map that to Salesforce, that will ick off a sync.

    Thread Starter ddoddsr

    (@ddoddsr)

    Kick off a sync

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add a field for the Account ID to map to set the account for all contact.’ is closed to new replies.