Hi All,
I have 3 Users , each has different security role , so each user can see different entities so i need to export All the Entities which are visible to respective users.
Thanks in Advance.
*This post is locked for comments
Hi Mahender,
Thanks for the quick response , for testing purpose i have connected to crm with of the user i have used below piece of code which looked it will work but it dint.
IOrganizationService service = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
RetrieveAllEntitiesRequest request = new RetrieveAllEntitiesRequest()
{
EntityFilters = EntityFilters.Attributes,
RetrieveAsIfPublished = true
};
// Retrieve the MetaData.
RetrieveAllEntitiesResponse responses = (RetrieveAllEntitiesResponse)service.Execute(request);
int count = responses.EntityMetadata.Count();
int count1 = 0;
foreach (var en in responses.EntityMetadata)
{
bool value = (bool)en.IsValidForAdvancedFind;
if (value == true)
{
Console.WriteLine(en.CollectionSchemaName);
count1++;
}
}
Console.WriteLine(count1);
Console.ReadLine();
Hi,
There is no direct way to implement your requirement unless you write something your own, but a possible solution could be export the security roles in excel and extract your requirement information from there: archive.codeplex.com
Hope it will help.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156