โ10-22-2024 05:46 AM
Hi guys, i want help today i created one recipe using JS snippet by workato in this recipe i get the data from Salesforce and by using JS connector i did the Data Transformation , in this JS connector i defined the schema for input and output field but whenver i am trying to create a list by using variable by workato and maapind the datapill i'm getting empty array no value is coming , i don't know how to provide the value to output field which one is defined in output schema.
Recipe:-
js code block :-
output from js snippet - this is output & input Schema for JS Snippet :-
creating List and mapping data but not getting any value :-
i'm trying to map with output schema but not getting any value.
Solved! Go to Solution.
โ10-22-2024 09:12 AM
On the JS connector output schema the output is named "output", but in your code the output is named "updatedInput". They need to match.
a month ago
@Patel0786 Is there any reason for not directly using formulas when mapping your Salesforce search results into a list, even if the JS code is working properly? We usually recommend using code (via JS, Ruby, or Python connectors) as a last resort to implement specific solutions that can't be covered using a Low-Code/No-Code approach, or when code can be significantly more efficient in terms of tasks or execution time. Apparently, neither of these situations applies to your use case. A Low-Code/No-Code approach speeds up development and facilitates the subsequent maintenance of recipes. That's why we always say this should be the ideal approach when possible.
โ10-22-2024 09:12 AM
On the JS connector output schema the output is named "output", but in your code the output is named "updatedInput". They need to match.
a month ago
@Patel0786 Is there any reason for not directly using formulas when mapping your Salesforce search results into a list, even if the JS code is working properly? We usually recommend using code (via JS, Ruby, or Python connectors) as a last resort to implement specific solutions that can't be covered using a Low-Code/No-Code approach, or when code can be significantly more efficient in terms of tasks or execution time. Apparently, neither of these situations applies to your use case. A Low-Code/No-Code approach speeds up development and facilitates the subsequent maintenance of recipes. That's why we always say this should be the ideal approach when possible.