You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create relationships between tables using the relationship API. For a complete working example, see [examples/advanced/relationships.py](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/blob/main/examples/advanced/relationships.py).
615
615
616
616
```python
617
-
from PowerPlatform.Dataverse.models.relationship import (
617
+
from PowerPlatform.Dataverse.models import (
618
+
CascadeConfiguration,
619
+
Label,
620
+
LocalizedLabel,
618
621
LookupAttributeMetadata,
619
-
OneToManyRelationshipMetadata,
620
622
ManyToManyRelationshipMetadata,
623
+
OneToManyRelationshipMetadata,
621
624
)
622
-
from PowerPlatform.Dataverse.models.labels import Label, LocalizedLabel
623
625
624
626
# Create a one-to-many relationship: Department (1) -> Employee (N)
625
627
# This adds a "Department" lookup field to the Employee table
@@ -821,7 +823,7 @@ The client raises structured exceptions for different error scenarios:
821
823
822
824
```python
823
825
from PowerPlatform.Dataverse.client import DataverseClient
824
-
from PowerPlatform.Dataverse.core.errorsimport HttpError, ValidationError
826
+
from PowerPlatform.Dataverse.core import HttpError, ValidationError
825
827
826
828
try:
827
829
client.records.retrieve("account", "invalid-id")
@@ -862,8 +864,7 @@ Enable file-based HTTP logging to capture all requests and responses for debuggi
862
864
863
865
```python
864
866
from PowerPlatform.Dataverse.client import DataverseClient
865
-
from PowerPlatform.Dataverse.core.config import DataverseConfig
866
-
from PowerPlatform.Dataverse.core.log_config import LogConfig
867
+
from PowerPlatform.Dataverse.core import DataverseConfig, LogConfig
867
868
868
869
log_cfg = LogConfig(
869
870
log_folder="./my_logs", # Directory for log files (created if missing)
0 commit comments