In case anyone else encountered this problem. You have to edit your function and check the "has return value" box. Then your return will work. After this you have to use "Call Function" again and now you have a new field for saving results.
Run function asynchronously from Node.js
-
// Dummy async function to simulate BAS processing
async function processWithBAS(lead_id,vin, mileage, options,body_type,cylinders,series,transmission,fuel_type,year,make,model,doors,save_app) {
try{
console.log("parms",lead_id,vin, mileage, options,body_type,cylinders,series,transmission); // Should log the vin
var Result = await BAS_FUNCTION(
"Get_Appraisal",
{MILEAGE_PARAM: mileage, OPTIONS_PARAM: options,VIN_PARAM: vin,
Body_Type_PARAM:body_type,Cylinders_PARAM : cylinders,SERIES_PARAM : series,
Transmission:transmission,lead_ID:lead_id, year: year, make : make,model:model,fuel_type:fuel_type,Doors_PARAM:doors,
Save_APP_PARAM: save_app })
console.log(vin,Result);
}catch (error) { // Catch and send any errors that occur during processing console.log(error.message); } return Result}
I want to run this var Result = await BAS_FUNCTION(
asynchronously with a separate browser, how can I do it?
OI tried copy paste it gives weird code with hash