I am doing some experimentation with Virtual Entities, which is something I haven't touched in a long time, so I am hoping that I am just missing something basic here and someone can Rubber Duck for me...
I set up a new VE with R and RM events and registered it in an org I have had for a long time (the plugins are super-basic hello world stubs so there is no chance there is some external failure here). The RM event works fine, but when I go for the R, I get this rather odd permissions failure:
I am Sysadmin, of course, so my first reaction to this is "what the...?"
Then I read more documentation and learn that full CRUD actions are now supported by VEs (nice work, MSFT - I'm gonna use that!) and I realize that when I registered my plugin, I only saw R and RM options. "Aha!" I think to myself, "My org must be out of date only enough to not let me register those events, but current enough that it is checking to see if they are there and hence this 'create privilege' failure." So I kicked off a couple pending base solution upgrades, but being a good impatient developer, I then decide, "why wait?" and I jump over to my personal dev instance which just got spun up last week. Sure enough, when registering this time I get the full complement of CRUD messages and I add in a stub Create message this time that does absolutely nothing; just returns a new Guid.
However, no dice. Totally different org, now with a create step, and still I get that same error:
I'm not seeing it. What am I missing here?
Nice find! Can't believe I messed that one up!
SOLVED.
In the retrieve multiple plugin you have to mange the id of your virtual entity.
For example:
foreach (var row in products)
{
Entity veextrow = new Entity("new_product");
veextrow["new_productid"] = Guid.NewGuid();
veextrow["new_name"] = row.name;
veextrow["new_extsourceid"] = row.id;
veextrow["new_address"] = row.address;
veextrow["new_accountid"] = new EntityReference("account", row.customer);
veextrow["new_startdate"] = DateTime.Parse(row.startdate, cultureInfo);
//add it to the collection
results.Entities.Add(veextrow);
}
//return the results
context.OutputParameters["BusinessEntityCollection"] = results;
Hi,
i'm facing the same issue trying to open a record from a custom Data Provider that call an external API. Retrieve Multiple works well but opening a record i receive the "Create privilege violation encountered" error.
It seems that D365 try to open the form in create instead of firing Retrieve message and call custom plugin.
Did you have solved this problem?
Regards.
Hi,
I'm having the same issue... I believe the problem is that this should bypass the main operation event since the record can't exist in the database (or at least that's how I interpret virtual entities). I believe it could be something in new client interface that checks for the GUID and if there's one prefilled, but no record exists, it tries to create a new one? Hard to say... Anyway, I can't use this for the implementation.
Other big issue I've come across is exporting connectionDefinitionSecrets. I mean it makes sense that you can't export those, but if you have a custom data source and you want to deploy it with managed solution, you can't input the secret after the deploy, MS is somehow serializing it into JSON and it is not aware of the key (attribute that you've enabled for connection definition secret in metadata).
I certainly don't suggest everyone using this feature. It's documented very poorly and it doesn't seem to work with custom providers.
Yeah, I started getting all 5 as soon as I hit the newer org and I see all 5 now that I have updated all base solutions in the older org. In both cases, with or without a create event I get this same error.
Hello,
Did you update plugin registration tool? There are 5 dropdowns now on the registration of the datasource.
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
65
Super User 2025 Season 1