object-sync-for-salesforce icon indicating copy to clipboard operation
object-sync-for-salesforce copied to clipboard

If a WP object fails on initial sync to SF, it's impossible to update the WP object to fix the issue

Open OfficeBureau opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. If an object fails to sync for any number of mapping-related reasons (field too long, field exception, etc), it's not possible to update the WP object to fix the issue. Doing so will just trigger an attempt to push an 'update' to an object in SF that doesn't exist, triggering a 400 error.

Describe the solution you'd like If a WP object fails an initial sync to SF, subsequent 'update' events in WP should trigger a creation event until the object is successfully created in SF.

OfficeBureau avatar Aug 18 '20 18:08 OfficeBureau

I think I might have encountered a similar problem. I had an error in one of my hooks that triggered a mapping error. When I try to remap the SF object to the WP Object under the Mapping Errors tab, I get an error:

[18-Jun-2021 17:04:00 UTC] WordPress database error Unknown column 'action' in 'field list' for query UPDATE wp_kisycj1w0s_object_sync_sf_object_map SET action = 'post_object_map', id = '357', wordpress_id = '598715', salesforce_id = 'a0I1H00000PGj0GUAT', object_updated = '2021-06-18 10:04:00' WHERE id = '357' made by do_action('admin_post_post_object_map'), WP_Hook->do_action, WP_Hook->apply_filters, Object_Sync_Sf_Admin->prepare_object_map_data, Object_Sync_Sf_Mapping->update_object_map

pattyok avatar Jun 18 '21 17:06 pattyok

In #471, I've added some work that I hope will begin to make this possible to fix. It may not address all the cases where this is a problem, but I'm hoping it's a good start. It will come out in version 2.2.0, which I'm hoping to release shortly.

jonathanstegall avatar May 20 '22 16:05 jonathanstegall