Calling Async C# Method #654
Answered
by
ClearScriptLib
charles-slc
asked this question in
Q&A
-
I've read through everything I can find, including For (silly) reasons, we are trying to use the C# Dynamo Client from JS. We have a C# method that looks like so:
A "working" TestScript.js looks like so
But I know that using I've tried various things, but can't seem to get it to work. |
Beta Was this translation helpful? Give feedback.
Answered by
ClearScriptLib
Apr 23, 2025
Replies: 1 comment 2 replies
-
Hi @charles-slc,
Since you're enabling task-promise conversion, why not simply use async function PostDDB() {
// ...
let results = await table.PutItemAsync(docItem);
return results;
} And then: engine.Execute(script);
var results = await (Task<object>)engine.Invoke("PostDDB"); Good luck! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To get data back from
PutItemAsync
, you need to set up aPutItemOperationConfig
. For example: