csyoung
Forum Replies Created
-
Forum: Plugins
In reply to: [Object Sync for Salesforce] Salesforce Null handlingIn function map_params() in salesforce_mapping.php
we changed the code to check for the case of if we are updating from salesforce and we removed the check for the value being != ” in that case.
Seems to fix our problem.
Do you think this is safe or might it have repercussions?
Thanksswitch ( $trigger ) {
case $this->sync_sf_update:
// Make an array because we need to store the methods for each field as well.
if ( isset( $object[ $salesforce_field ] ) ) {
$params[ $wordpress_field ] = array();
$params[ $wordpress_field ][‘value’] = $object[ $salesforce_field ];
} else {
// If we try to save certain fields with empty values, WordPress will silently start skipping stuff. This keeps that from happening.
continue;
}
break;
default:
// Make an array because we need to store the methods for each field as well.
if ( isset( $object[ $salesforce_field ] ) && ” !== $object[ $salesforce_field ] ) {
$params[ $wordpress_field ] = array();
$params[ $wordpress_field ][‘value’] = $object[ $salesforce_field ];
} else {
// If we try to save certain fields with empty values, WordPress will silently start skipping stuff. This keeps that from happening.
continue;
}
break;
}Forum: Plugins
In reply to: [Object Sync for Salesforce] Salesforce Null handlingWe are experiencing the same problem. When fields are emptied on the Salesforce side, the wordpress side retains the old value. Is there a fix in the works or could you point me to a hook where I might be able to handle this case? Btw, we love this plugin!
Thanks