• Resolved dennisdit

    (@dennisdit)


    Thank you for your help as always. I have a lot of fields that need to sync with Salesforce. I am trying to use 3 different fields maps for WordPress user creations, WordPress user updates, and Salesforce updates. I am always confused by the trigger settings because it seems WordPress user creation would go through the field mapping which is set for WordPress updates.

    Anyway, it was working somehow until recently and it keeps giving “Create Salesforce Account with ID xxx was not allowed by this field map”. I added a lot of logs, it seems $mapping_object = $this->mappings->load_all_by_wordpress( $object_type, $object[ $wordpress_id_field_name ] ); This always return empty.

    Would you mind throwing me some ideas on how to fix this? I have a lot of fields set as “sync” in 3 mappings, also MySQL and the webserver is in different time zones, this might mess up scheduling for pushing/pulling? Did salesforce fail to create an object?

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

    (@jonathanstegall)

    So there’s a lot going on here, I don’t think I am able to help you without a more specific question. But I’ll see if I can give some info.

    This error log entry happens when the plugin is trying to run an event on one of the triggers (WordPress create, WordPress update, or WordPress delete) and the settings don’t allow it. It could be that the plugin is trying to update a record that was not successfully created (if that’s the case, there would be another error log).

    If the load_all_by_wordpress method returns an empty value, I think that would suggest that the plugin is unable to find a record by that WordPress ID. Maybe you had a WordPress object that got deleted.

    When you say you have a lot of fields in three different mappings, I don’t know what that means and I can’t speak to whether that would be a problem. In my memory, at least, the plugin doesn’t do anything that is timezone specific. If you discovered that there was a timezone issue that would be good to know, though.

    Thread Starter dennisdit

    (@dennisdit)

    Thank you very much for this. I have tracked the issue. It seems related to the MySql time stamp. Saving map in wp_object_sync_sf_object_map with tmp_ id always 2-3 minutes delayed. It might be a timestamp for set_transient in wp_options is wrong because the MySql server is on a different time zone or something.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Are you able to find any transients that set a timezone-specific value? I could be wrong, but my recollection is that when WP 5.3 came out, I changed anything that was timezone specific away from that. So I’d like to know if there is anything that I missed that’s causing this.

    Thread Starter dennisdit

    (@dennisdit)

    Some transients seem set to a couple of hours behind. Looks like it’s taking timestamps from a database server that has a different time zone. Also, the pulling queue has some items left that can’t be cleared. I guess it’s all related.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    Okay. I was hoping you could give some specific transient names that have timezones and if the timezone they’re using is familiar to you. In any case, I notice that it does sometimes retrieve the LastModifiedDate value that comes from Salesforce, convert it to a timestamp, and store that as the transient value. At least on the Salesforce I have access to, LastModifiedDate is a UTC time. I don’t think we ever use the MySQL time in a transient.

    In any case, I’m not clear on how this is causing the problem that it’s causing you. I’m not opposed to taking steps to address it if I can figure out exactly where the problem is, but I’m unclear on why it’s happening/where exactly the problem is, and I don’t want to take steps to fix it that might break things for the majority of users.

    Thread Starter dennisdit

    (@dennisdit)

    You are absolutely right. I will try to dig into this and see if I can find something concrete.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Create Salesforce Account with ID xxx was not allowed by this fieldmap’ is closed to new replies.