I am creating a new virtual entity record using Dynamics Plugin Code in Power Apps. I can manually do this through the front end?
but plugin code :
var verecord = new Entity("mserp_virtualentity")
{ ["mserp_name"] = "Create" };
verecord.Id = service.Create(verecord); //<-- throws exception
Exception : "Custom plugin execution is not allowed in nested pipeline for Virtual Entity."
dll step is registered on the postContactUpdate event. Also not sure if this has any bearing but the datasource (Finance & Operations) has this table Data Event(s') also Activated to handle 'OnExternalUpdate' (plugin elsewhere but is never called or triggered here)
As the exception says "plugin execution is not allowed in nested pipeline for Virtual Entity" - because these Virtual entities does have their own data events registered any plugin code cannot be part of the pipeline.
Running the plugin async will resolve this issue running in its own execution pipeline.