Salesforce Language: Is it possible to access the datavalue of an object outside of the "Create" method?

We’re trying to create a single lang-salesforce job that will handle posting to multiple tables (will add snippets below).

In order to do this, we will need an “if” statement that will decide which table to post to based on a custom filter in the incoming JSON.

Is this possible with the current adapter?

Example of job:

Example of input:

Hey Carl, could you achieve this with a switch function inside the create(…)?

create(1,2) takes 2 arguments, an object and a set of fields. I’m thinking:

// 1 - the object to create
function(state) {
switch (thing_to_evaluate) {

case “foo”: return “bar”;
case “baz”: return “qux”;
// 2 - the fields

I should have time to look at this properly tomorrow, but this is the first thing that comes to mind. Please let me know if it works for you.


@Wes, you’ve handled this recently, no? You came across that limit of 25 concurrent API calls to Salesforce but did come up with a way to “create if”. Would you mind sharing your code with Carl?


Hey Taylor,

I think your proposed solution should work fine in this case and is similar to how we’ve done it. Anything additional beyond your idea I’d have to get back to you.



Great, thanks Wes. Can I share your expression code in this forum?

Yep! You’re looking at doing something like the below. If you want to create additional if-else logic at the field level, you just pass another function, but inside the field(). Hops this helps!



fields and relationships



Hi Everyone, thanks for your help with this!

This will be really beneficial as we plan to run multiple conditional jobs in the near future.