• Resolved Rohan

    (@rocodes)


    Thanks for the excellent plugin!

    When a user deletes an object in Salesforce, I’m not getting any response in WordPress. Debug logs don’t show anything once the action runs. Everything else syncs fine. Is this expected behavior? I searched the docs but can’t find anything about this issue.

    Cheers

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

    (@jonathanstegall)

    Hm, it should create a log entry if it is successfully able to delete the WordPress record (or an error log entry if it is not able to do it). Is the WordPress record actually being deleted, or is it still there?

    Thread Starter Rohan

    (@rocodes)

    Just a little bit more context, we have a custom post type Event that’s mapped to an Event Object in Salesforce. When an Event Object in Salesforce is deleted, it doesn’t trigger the delete of the Event post in WordPress. There’s no mention in the logs, error or otherwise. Bit of an odd one

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    I think what I’d do is turn on Debug Mode in the plugin settings. Then, watch the log entries to see what API calls the plugin is sending to Salesforce.

    Generally, for a call like the call that retrieves deleted records, the log entry will be something like this:

    Title:
    Debug Salesforce API call: read the full log entry for request and response details. There is not an SOQL query included in this request.

    Body:

    HTTP method: GET

    URL of API call to Salesforce: [your salesforce]/services/data/v54.0/sobjects/Contact/deleted/?start=[start datetime]&end=[end datetime]

    API result from Salesforce
    Array
    (
    [code] => 200
    [data] => Array
    (
    [deletedRecords] => Array
    (
    )

    [earliestDateAvailable] => [earlier datetime]
    [latestDateCovered] => [later datetime]
    )

    [from_cache] =>
    [cached] =>
    [is_redo] =>
    )

    The important part is that it's running sobjects/Contact/deleted as part of the API call (though Contact would presumably be Event in your case).

    I think you should start by checking if this call is actually running, and if it is, whether the plugin is doing something incorrect that causes it not to get results like it should.

    Thread Starter Rohan

    (@rocodes)

    Thanks heaps for your help. Turned out it was my object_sync_for_salesforce_pull_object_allowed filter. I didn’t realise this could also stop deletes. Modified and now deleting as it should.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Deleting Object in Salesforce does not sync’ is closed to new replies.