Hi,
We're getting started with Salesforce integration using Neuron ESB, and we've set up some basic SOQL queries, which work great. We want to do some more complex manipulations of the data in Salesforce based on the results of queries. Not knowing either system all that well, I have a question on the best way to proceed here. If I want to do a basic DML thing like update a field indexed by an ID that's returned by a query like:
List<Contact> cc = [Select Id, ParentID from Contact where modDate >= 5];
for Contact c: cc {
List<Contact> aa = [Select Id, readyDate from Contact where Id = c.ParentID];
aa.readyDate = systimestamp();
update aa;
}
From what I see, I could expose this from Salesforce as a custom API call. I imagine I could do this in code from Neuron. If wanted to, I suppose I could transform the returned XML from the initial SOQL call to a series of updates. Maybe there are easier ways. My question is what do you think would be the easiest way to do something like this?
Mark
Tags: DML, SOQL, Salesforce
We wouldn't suggest calling SF from code in Neuron. You can either use the update operation on the sObject or expose your custom logic as a APEX service and use the adapter.
That's what I thought, thanks Joe!
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by