microsoft / PowerApps-Samples

Sample code for Power Apps, including Dataverse, model-driven apps, canvas apps, Power Apps component framework, portals, and AI Builder.
https://docs.microsoft.com/powerapps
MIT License
1.52k stars 1.7k forks source link

Generate Entity Diagram - Move_excludedEntities to config #633

Closed edfenergy-richardcannock closed 2 weeks ago

edfenergy-richardcannock commented 1 month ago

In the power apps sample to generate a Entity Diagram from the Dataverse metadata, can I suggested that the _excludedEntities,

static string[] _excludedEntities = new string[] { "activityparty" , "annotation" , "appointment" , "asyncoperation" , "attributemap" , "bulkdeletefailure" , "bulkimport" , "bulkoperationlog" , "businessunit" , "businessunitmap" , "commitment" , "connection" , "displaystringmap" , "documentindex" , "duplicaterecord" , "email" , "entitymap" , "fax" , "imagedescriptor" , "importconfig" , "integrationstatus" , "internaladdress" , "letter" , "msdyn_wallsavedquery" , "msdyn_wallsavedqueryusersettings" , "owner" , "partnerapplication" , "phonecall" , "plugintype" , "postfollow" , "postregarding" , "postrole" , "principalobjectattributeaccess" , "privilegeobjecttypecodes" , "processsession" , "processstage" , "recurringappointmentmaster" , "roletemplate" , "roletemplateprivileges" , "serviceappointment" , "sharepointdocumentlocation" , "statusmap" , "stringmap" , "stringmapbit" , "subscription" , "systemuser" , "task" , "tracelog" , "traceregarding" , "userentityinstancedata" };

and _excludedRelationships entries

static string[] _excludedRelations = new string[] { "owningteam", "organizationid" };

in DiagramBuilder are instead added to app.config and read from config rather than in the code. It would make generating the diagrams easier.

phecke commented 3 weeks ago

@edfenergy-richardcannock How does this make it easier? Are you modifying the list of excluded entities/relationships, and so moving those lists to the config file would not require you to recompile?

edfenergy-richardcannock commented 2 weeks ago

@phecke - yes, that's exactly it. I am modifying the list of excluded entities and relationships to provide a more succinct view of the key business domain entities that we primarily use from our perspective. Having to recompile is a bit cumbersome, particularly for those users who don't have access to VS or the source code, but who may wish to generate the ERD. Many thanks.

phecke commented 2 weeks ago

@edfenergy-richardcannock We give you the source code so that you can understand how the program works and can modify it as needed. If you want to make the code changes and submit a PR, I will review it and consider merging the PR.

The upcoming change for the program is to update the code from using the CrmServiceClient to ServiceClient class when establishing the web service connection. This will remove the reliance on the ADAL.NET library which has been deprecated. We keep getting pings from customers about this.

I will consider your request as an enhancement. However, considering our small team and workload, it would be some time before we could ever get around to making such code changes.

Thanks for your feedback.