Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Build.Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
<!-- msbuild properties shared for dotnetCore and .NET classic projects: -->
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<PackageVersion_AppInsights>2.10.0</PackageVersion_AppInsights>
<PackageVersion_Adal>3.19.8</PackageVersion_Adal>
<PackageVersion_MSAL>4.35.1</PackageVersion_MSAL>
<PackageVersion_CdsSdk>4.7.9489-v9.0-master</PackageVersion_CdsSdk>
<PackageVersion_CrmProxy>4.7.9409-v9.0-master</PackageVersion_CrmProxy>
<PackageVersion_CdsSdk>4.7.11043-v9.0-weekly-2209.2</PackageVersion_CdsSdk>
<PackageVersion_CrmProxy>4.7.11043-v9.0-weekly-2209.2</PackageVersion_CrmProxy>
<PackageVersion_CDSServerNuget>4.6.6061-weekly-2108.5</PackageVersion_CDSServerNuget>
<PackageVersion_CdsSdkProxy>4.7.6346-master</PackageVersion_CdsSdkProxy>
<PackageVersion_Newtonsoft>13.0.1</PackageVersion_Newtonsoft>
<PackageVersion_RestClientRuntime>2.3.20</PackageVersion_RestClientRuntime>
<PackageVersion_XrmSdk>9.0.2.45</PackageVersion_XrmSdk>
<PackageVersion_Dep_OutlookXrmSdk>9.0.2.34</PackageVersion_Dep_OutlookXrmSdk>
<PackageVersion_BatchedTelemetry>2.0.19</PackageVersion_BatchedTelemetry>
<PackageVersion_BatchedTelemetry>3.0.5</PackageVersion_BatchedTelemetry>
<PackageVersion_DataverseClient>0.4.20</PackageVersion_DataverseClient>
<PackageVersion_CoverletCollector>3.1.0</PackageVersion_CoverletCollector>
<PackageVersion_Microsoft_Extensions>3.1.8</PackageVersion_Microsoft_Extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,19 @@ public enum DataverseFieldType
/// Guid Type - Converts from a Guid Type
/// </summary>
UniqueIdentifier,
/// <summary>
/// User Specified type... will be appended directly. This type must be one of the valid Dataverse types
/// </summary>
Raw


}
/// <summary>
/// Use image columns to display a single image per row in the application
/// </summary>
Image,
/// <summary>
/// The File column is used for storing binary data
/// </summary>
File,
/// <summary>
/// User Specified type... will be appended directly. This type must be one of the valid Dataverse types
/// </summary>
Raw
}

/// <summary>
/// Contains a variable definition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public TimeSpan RetryPauseTime
set => _retryPauseTime = value;
}

private bool _useWebApi = Utils.AppSettingsHelper.GetAppSetting<bool>("UseWebApi", true);
private bool _useWebApi = Utils.AppSettingsHelper.GetAppSetting<bool>("UseWebApi", false);

/// <summary>
/// Use Web API instead of org service
Expand Down
19 changes: 16 additions & 3 deletions src/GeneralTools/DataverseClient/Client/ServiceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,7 @@ public string EnvironmentId
}

/// <summary>
/// Use Web API instead of org service where possible.
/// WARNING. THEASE ARE TEMPORARY SETTINGS AND WILL BE REMOVED IN THE FUTURE
/// Use Dataverse Web API instead of Dataverse Object Model service where possible - Defaults to False.
/// </summary>
public bool UseWebApi
{
Expand Down Expand Up @@ -1590,6 +1589,20 @@ public OrganizationResponse ExecuteOrganizationRequest(OrganizationRequest req,
{
return ExecuteOrganizationRequestImpl(req, logMessageTag, useWebAPI, false);
}

/// <summary>
/// Executes a Dataverse Organization Request (In Async mode) and returns the organization response object. Also adds metrics for logging support.
/// </summary>
/// <param name="req">Organization Request to run</param>
/// <param name="logMessageTag">Message identifying what this request in logging.</param>
/// <param name="useWebAPI">When True, uses the webAPI to execute the organization Request. This works for only Create at this time.</param>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns>Result of request or null.</returns>
public async Task<OrganizationResponse> ExecuteOrganizationRequestAsync(OrganizationRequest req, string logMessageTag = "User Defined", bool useWebAPI = false , CancellationToken cancellationToken = default)
{
return await ExecuteOrganizationRequestAsyncImpl(req, cancellationToken, logMessageTag, useWebAPI, false);
}

#endregion

#region Internal
Expand Down Expand Up @@ -1650,7 +1663,7 @@ private async Task<OrganizationResponse> ExecuteOrganizationRequestAsyncImpl(Org
/// <param name="bypassPluginExecution">Adds the bypass plugin behavior to this request. Note: this will only apply if the caller has the prvBypassPlugins permission to bypass plugins. If its attempted without the permission the request will fault.</param>
/// <param name="cancellationToken">Propagates notification that operations should be canceled.</param>
/// <returns>Result of create request or null.</returns>
internal async Task<OrganizationResponse> Command_ExecuteAsync(OrganizationRequest req, string errorStringCheck, System.Threading.CancellationToken cancellationToken, bool bypassPluginExecution = false)
internal async Task<OrganizationResponse> Command_ExecuteAsync(OrganizationRequest req, string errorStringCheck, CancellationToken cancellationToken, bool bypassPluginExecution = false)
{
ValidateConnectionLive();
if (DataverseServiceAsync != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<PackageReference Include="FluentAssertions" Version="$(PackageVersion_FluentAssertions)" />
<PackageReference Include="Microsoft.PowerPlatform.Dataverse.Client" Version="$(TargetDvClientPackageVersion)" />
<PackageReference Include="Microsoft.PowerPlatform.Dataverse.Client.Dynamics" Version="$(TargetDvClientPackageVersion)" />
<PackageReference Include="System.Private.Uri" Version="4.3.*" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Notice:
Note: Only AD on FullFramework, OAuth, Certificate, ClientSecret Authentication types are supported at this time.

++CURRENTRELEASEID++
Added Async version of ExecuteOrganizationRequest to allow for requests to be made bounded with a custom logging message.
Update Default settings for "UseWebAPI" in preparation for future work.
Note: for Create or Update operations that make extensive use of related entities you may need to reconfigure UseWebAPI to "true".

1.0.9:
Fixed an issue with Custom User Agent headers incorrectly causing a format error when .net core is used. Proper User-Agent format must be used to send requests including the user agent.
Fixed an issue with an Empty OptionSetValue collection causing an ArgumentOutOfRangeException. Empty OptionSetValue collections will now be mapped to Null. Fixes https://github.com/microsoft/PowerPlatform-DataverseServiceClient/issues/292 Thanks for your report!
Fixed an issue where EntityReference based operations do not propagate RowVersion when using WebAPI protocol. Fixes https://github.com/microsoft/PowerPlatform-DataverseServiceClient/issues/296
Expand Down