I am looking for some high level advice.
When you have an app to read and write data from Dynamics, how do you handle the navigation properties or option sets. (My question is not which API to use). What are some best practices?
I assume you don't use hard coded names for entities? Do you need to know the values of option sets? How do you navigate navigation properties?
I assume this is really more related to the concepts of open data?
please specify if you are talking about model-driven apps or canvas apps?
Model driven apps take care of all of that for you--they provide the navigation--for example, I add two entities: Inspection and step.
I create a 1:N relationship between inspections and steps.
CDS creates the relationship and any app with those entities in it provides the navigation path without you having to do anything. on Inspection, you see the related inspection steps in the inspection navigation, from inspection step you have a lookup field with hyperlink back to the parent inspection.
Canvas apps are different in that you have to set up the navigation to the form, etc, but CDS provides the relationship linkage. You do need to add a connection to any entity in your canvas app.
Option sets provide a list of options with a string value and support multiple languages of text label. https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/create-edit-gl...
Did that help, or are you looking for more?
Generally as guidelines, especially for larger implementations, we try to use entities (lookups) as reference (i.e. navigation properties as you call it) instead of option sets. Future thinking and for flexibility, entity allows us to determine additional properties (e.g. Display Order, or Code) whereas option sets are just key value pairs. Even for a field like Gender where the obvious choice might be an option set, but analyzing more in details, Gender can be exposed in a Portal, internally in different apps and each of those might have difference requirements. For example portal needs a different display order and a different user-friendly label. But if we have to use option sets then always go for global option set in case another entity needs it in the future.
That said, to go back to your original question, how do we handle these? Well it depends on the scenario. Here are the typical ones:
Hope this all makes sense....
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.