DEV Community

Oliver Flint
Oliver Flint

Posted on • Originally published at oliverflint.co.uk on

PCF WebApi execute

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

Top comments (0)