DEV Community

loading...

PCF WebApi execute

oliverflint profile image Oliver Flint Originally published at oliverflint.co.uk on ・1 min read

The PCF WebApi execute method is lurking in the background!

Yep, missing from the docs and the type definitions but it's there and it works!

execute

(context.webAPI as any).execute(request).then(successCallback, errorCallback);
Enter fullscreen mode Exit fullscreen mode

see the execute Client API docs for more info

executeMultiple

(context.webAPI as any)
  .executeMultiple(requests)
  .then(successCallback, errorCallback);
Enter fullscreen mode Exit fullscreen mode

see the executeMultiple Client API docs for more info

Enjoy!
Ollie

Disclaimer!
Some of the tips 'n' tricks in the PCF Tips 'n' Tricks category are to be used with caution. Although they may work at the time of writing, they may or may not be officially supported by Microsoft

Discussion (0)

Forem Open with the Forem app