• Resolved Devarajan Mani

    (@devarajanm)


    Currently i need to map a checkbox field in SF with WP. I tried creating a custom field with checkbox or Text data type using ACF Pro plugin in WP. The value of the checkbox is not updated in WP pulled from SF.
    The cron is working fine with the scheduled time of every 5 mins, but the checkbox value alone is not getting updated in WP.
    Quick response or solution could be appreciated. Thanks

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

    (@jonathanstegall)

    Well, certainly I don’t have a quick solution but you might be able to discover a solution eventually. Some questions to get you started:

    1. Do non-checkbox fields update when pulled to WordPress as they should? Including other ACF field types?
    2. Does the checkbox get updated if you push to SF?
    3. Do you have any error logs, either on your server or in WordPress?
    4. Have you tried a non-ACF checkbox? Does it work as it should?

    Thread Starter Devarajan Mani

    (@devarajanm)

    Thank you for your prompt response.
    1. The non-checkbox fields (text and textarea) are updated when pulled to WP.
    2. I did not try as the the requirement is to pull from SF to WP and not vice-versa.
    3. No errors displayed in server nor in the WordPress. The cron log shows object_sync_for_salesforce_pull_process_records as complete.
    4. I can eventually try, Can you tell me which custom field plugin works well with checkbox from your experience?

    Question: Is there a way to check the value of the checkbox of the SF record and manually update the ACF text field using a filter hook while object_sync_for_salesforce_pull_process_records pulls data of that particular record from SF to WP?

    Thanks again.

    Devarajan,
    I am using the non pro version of ACF and instead of using the checkbox field type, used True/False. This still displays and works as a checkbox and syncs both ways with a checkbox field in SF. Hope this helps.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Yes, I think @ibanezrg770 has the best solution. Salesforce is probably returning the data in a way that ACF doesn’t understand as a checkbox value.

    You certainly could use a developer hook to transform it if you need to. This plugin has a lot of hooks, but I don’t really provide support for them here. But in any case, you can see this list of all the hooks with documentation on them.

    Thread Starter Devarajan Mani

    (@devarajanm)

    Hi,
    I get the following error while salesforce_pull

    Error: WordPress update for member ID 93341 was unsuccessful with these errors:
    WP_Error Object
    (
    [errors] => Array
    (
    [invalid_post] => Array
    (
    [0] => Invalid post ID.
    )

    )

    [error_data] => Array
    (
    )

    )

    I cleared the records and set up the Object sync again, still issue is not resolved. The WP records are not getting updated.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Sure. It doesn’t seem to realize that there’s a post at all, at this stage. Are you trying to have Salesforce update a post that doesn’t exist?

    Thread Starter Devarajan Mani

    (@devarajanm)

    Thanks @jonathanstegall and ibanezrg770. Solved by clearing the table object_sync_sf_object_map as it is did not drop while deactivating the plugin.
    Delete plugin data on uninstall should be enabled to drop the tables related to the plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is there a way to pull SF checkbox value to WP ?’ is closed to new replies.