I have seen it in wave2 document: https://learn.microsoft.com/en-us/power-platform-release-plan/2022wave2/data-platform/use-optimized-apis-bulk-data-operations?source=recommendations
We are very eager to use this feature to improve performance when some business logic need to do bulk update/insert.
I saw in October it should became public preview, but I can't find it anywhere. Can somebody help? Thanks in advance.
@MattB-MSFT wrote:
@Anonymous wrote:executeMultiple is not supported in plugin, any request in plugin have to executed one by one.
for clarity sake, ExecuteMultiple can be called from a plugin.
I think your meaning to say "I cannot attach a plugin to the invocation of ExecuteMultiple", that is correct, you cannot do that. This is a lot to do with what ExecuteMultiple is designed to do and how it works in the SDK. ExecuteMultiple is a 'batch' concept where messages can be anything.
ExecuteMultiple is not supported inside a plugin, check this out:
I have struggled, tested for these stuff for a long time, the fact is the document is right. Even you can use ExecuteMultiple in plugin by force, the requests still not go into DB concurrently, as the document said, it has same effect of
foreach (request in requests) service.Execute(request)
On the server side, the operations included in a batch request are executed sequentially and aren't done in parallel.
Currently I cannot find one single way to do parallel DB actions inside a plugin, that's why I saw the new API as my savior.
@Anonymous wrote:
executeMultiple is not supported in plugin, any request in plugin have to executed one by one.
for clarity sake, ExecuteMultiple can be called from a plugin.
I think your meaning to say "I cannot attach a plugin to the invocation of ExecuteMultiple", that is correct, you cannot do that. This is a lot to do with what ExecuteMultiple is designed to do and how it works in the SDK. ExecuteMultiple is a 'batch' concept where messages can be anything.
Absolutely right now 100 records' creation should not be put in plugin, because they will executed in plugin one by one most likely it will hit 2mins timeout as you said. But if the creation requests can be concurrent executed as the document said, even 100 records will take few times then it can be inside a plugin reduce a lot of effort.
Plugin meant for short transactions that's the point I totally agree, but batch update a middle volume(10-100) of records should not be a long action, that' why I need a multiple message.
plugins have a timeout of 2 minutes, let's say you need to create100 records from the plugin, you can't know if they will be created under 2 minutes or not (for example these records can have sync plugins registered too), an executeMultiple also if works as expected probably will not solve this kind of issues. Plugins are meant for short transactions, working on records that require a "multiple" message usually is not.
Thanks @cchannon. Yes that is another solution, although it is likely we will have server side components anyway, but this may be a neater approach given the necessity to double hop if we do use an api.
executeMultiple is not supported in plugin, any request in plugin have to executed one by one. That's the pain point while the document in topic said the new api could be used in plugin.
I understand the idea of Microsoft trying to make any complex logic should not happened in plugin, but in real world it is inevitable that have to implement some critical business logics in plugin, than it become a performance issue when the logic need to have bulk update/insert.
Ah, OK. I missed that you were trying to do this from a PCF in canvas app. Yeah, that does add a fair bit of complexity.
But, it is worth noting that the webAPI object is not supported in PCFs in canvas apps, not the webAPI itself. So, it would still be considered a supported approach to have your own MSAL get token silent, then call the webAPI directly by REST message. Not the easiest thing to put together, but at least it wouldn't require an extra server-side component.
Thanks @cchannon,
I was hoping to get support directly in a PCF control, as part of a canvas app, which executeMultiple does not support. But yes, I could, at a stretch, have a server side implementation using the .NET SDK as per your link and my PCF communicates with that
OK, well if all you are looking for is to send an array of transactions in one message, I think you should take another look at executeMultiple. There are limitations, to be sure, but this does let you do exactly as you've suggested: throw a whole stack of transactions at the db all in one actual request.
There's also a walkthrough code sample that shows exactly how to use it.
This is a weird one because bulk update is literally the same message and mechanics as single update except with an array payload instead of record. You would think this would have been standard functionality 3 years ago. Unfortunately for me, this is the exact functionality, or lack of, that is impacting our use of the platform in a big way.
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72