@@ -1191,18 +1191,22 @@ def _create_entity(
11911191 solution_unique_name : Optional [str ] = None ,
11921192 ) -> Dict [str , Any ]:
11931193 url = f"{ self .api } /CreateEntities"
1194- payload = {"Entities" :[{
1195- "@odata.type" : "Microsoft.Dynamics.CRM.ComplexEntityMetadata" ,
1196- "SchemaName" : table_schema_name ,
1197- "DisplayName" : self ._label (display_name ),
1198- "DisplayCollectionName" : self ._label (display_name + "s" ),
1199- "Description" : self ._label (f"Custom entity for { display_name } " ),
1200- "OwnershipType" : "UserOwned" ,
1201- "HasActivities" : False ,
1202- "HasNotes" : True ,
1203- "IsActivity" : False ,
1204- "Attributes" : attributes ,
1205- }]}
1194+ payload = {
1195+ "Entities" : [
1196+ {
1197+ "@odata.type" : "Microsoft.Dynamics.CRM.ComplexEntityMetadata" ,
1198+ "SchemaName" : table_schema_name ,
1199+ "DisplayName" : self ._label (display_name ),
1200+ "DisplayCollectionName" : self ._label (display_name + "s" ),
1201+ "Description" : self ._label (f"Custom entity for { display_name } " ),
1202+ "OwnershipType" : "UserOwned" ,
1203+ "HasActivities" : False ,
1204+ "HasNotes" : True ,
1205+ "IsActivity" : False ,
1206+ "Attributes" : attributes ,
1207+ }
1208+ ]
1209+ }
12061210 params = None
12071211 if solution_unique_name :
12081212 params = {"SolutionUniqueName" : solution_unique_name }
0 commit comments