I am recently facing this issue as i am trying to query userform entity to fetch all the personal dashboards of a particular user using below query in my console application.
The problem is that the query is working fine when i am giving the same user credentials for crm to connect to my console application as for the user which i want to retrieve the personal dashboards i.e the ownerid for the owner of personal dashboards but when i am giving the different ownerid for the user to retrieve its dashboards than it is not returning its dashboards. It is returning the entity count as 0.
QueryExpression query = new QueryExpression("userform"); query.ColumnSet.AddColumns("name", "userformid", "ownerid", "type"); query.Criteria.AddCondition("ownerid", ConditionOperator.Equal, "00000-0000-0000-0000-00000000000");query.Orders.Add(new OrderExpression("name", OrderType.Ascending));
EntityCollection personalDashboardsCollection = _service.RetrieveMultiple(query); // retrieve collection of personal dashboards...
Thanks in advance!! :)
I think there is credential issue involved as other user do not have the permission to access personal view. Have you try to re-create it as system view, or share access of this personal view to the new user you intend to grant access to?
Many thanks for responding back.
I have tried giving the user system admin role as well. Actually what i think the issue is that it is only fetching the personal dashboards if the user is same as the logged in user of Crm otherwise it is returning the count as 0 for other user. As personal dashboards and views cannot be accessed by other users except the one owner. Because when i changed the login credentials i was able to fetch its dashboards also.
Actually the user for which we want to fetch the personal dashboards has left the organisation so we don't have credentials for that user so we want to retrieve those dashboards and change their owner to some other user
Actually, you could share the personal dashboard by having the owner of that dashboard to log in, go to that dashboard and choose SHARE DASHBOARD ribbon.
You can modify read/write permission given to each individual user. You also have to make sure the other user have access to the entities and fields used in the dashboard or the records will not be returned.
The owner has left the organisation we don't have its credentials that's why i want to retrieve his dashboards and assign it to some other users.
I see, is this cloud environment? If it is, the user credential should be governed by office 365 admin portal under user, you should be able to reset the password and access his account.
Basically i want to do it for on premise 365..
I think you could consider one of the two options below
01. Ask your domain or system admin to reset the password for that AD account and log in as that user and Share the dashboard with a team or any user you would like to share it with.
02. This option is not supported but it is a possibility. Since you are on-prem, you have direct access to SQL. You could think about changing the owenerid of the record in dbo.UserFormBase table. This an unsupported option, please try on a copy or test instance first. Only try this option if the Option1 is not possible at all and you desperately need access to the dashboard.
Thanks for responding back.
I can't comment on your first option as i am trying to get the account reset if possible cuz it is the best and easiest practice.
Already tried with the second option but it was having some adverse effects cuz some users were complaining that they were facing difficulty in viewing some dashboard that's why i tried it from a console app but then i have to face the issue which i have mentioned in the beginning.
Business Applications communities