Hello all,
does webapi not work when using parent table permissions or m:n relationships or did I do something wrong or is there a way to work around it?
parent table permissions
My situation is I want to store data of companies. Each company has children organizations, which have their own employees.
I use the account table to store data of organizations, contact table to store data of employees. For data of companies, I created a new table on Dataverse. On contact table, I created a lookup column, that looks up to the new company table.
I want users to be able to read data of all employees in their Company, so I first created a table permission for "Company". This permission has "Contact" type so each employee sees only the company they belong to. Then I created a child table permission from this permission for "Contact" using the relationship of the newly created company lookup table so that each employee can see data of employees in their company.
This works on Power Pages component like list but doesn't work when I try to call the contact data via webapi. I always get the following error:
{
"error": {
"code": "9004010D",
"message": "Common Data Service error occurred.",
"cdscode": "0x80040216"
}
}
m:n relationship
I want particular employees to be able to see data of more than one organizations, so I created an m:n relationship between account table and contact table using the native option on Power Apps. I created a table permission for account table with "contact" type using the created m:n relationship. This didn't work with webapi calling "account" data as well. I got this error:
{
"error": {
"code": "9004010D",
"message": "Common Data Service error occurred.",
"cdscode": "0x80060888"
}
}
Has anyone ever come across these errors or could maybe guide me to the way to solve it. At the moment, I'm trying to use "account" table to store the "company" data too. It works with the webapi call but the management of data is a bit complicated because organization data and company data have different attributes.
Thanks in advance for your answers.
Hi @davidkr,
Please have a look to this video https://www.youtube.com/watch?v=6hpz1GXMemY
If this post helps you with your problem, please mark this answer as Accepted Solution.
If you like my response, please give it a Thumbs Up.
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43