For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
I am trying to see if the Data Import Wizard has the capability to add a column's value to an existing field rather than overwrite its value.
We are looking to see if we can sum the total dollar value spent on a contact record, and potentially display this field on the agent workspace. We have several data sources available for import that have columns for email address and net sales. We would like to store this cumulative value for all of these sales figures.
Is there a way to do this with the Data Import Wizard, or by any other method?
Comment
I think you can do this via CPM if you are ok with development....In the data import wizard, enable run external events/CPMs in the main screen of the Data Import wizard screen....pseudo code
public static function apply( $run_mode, $action, $obj, $n_cycles )
{
$existingvaluequery = RNCPHP\ROQL::query("select customfields.c.customfield from contact where ID=".$obj->ID)->next()->next();
$existvalue = $existingvaluequery['customfield'];
$updatedvalue = $obj->CustomFields->c->customfield + $existvalue;
$obj->CustomFields->c->customfield = $updatedvalue;
$obj->save(RNCPHP\RNObject::SuppressAll);
}
~Suresh
Average Rating:



1 rating
|
Sign in to rate this
Hi Suresh,
I think querying a custom field will get you the updated value and is the only way to do it since custom fields are not available in the object passed in CPM.
And, to get the existing (or previous) value, prev should be used. $obj->prev->CustomFields->c->customfield
-Anuj
Average Rating:



1 rating
|
Sign in to rate this
Be the first to rate this
|
Sign in to rate this