Table of Contents

Class PluginTransactionOrgServiceExtensions

Namespace
Hsl.Xrm.Sdk
Assembly
Hsl.Xrm.Sdk.Plugin.dll

Extensions for IOrganizationService designed for use in plugins to execute actions in a new transaction using ExecuteMultiple.

public static class PluginTransactionOrgServiceExtensions
Inheritance
PluginTransactionOrgServiceExtensions
Inherited Members

Methods

CreateInNewTransaction(IOrganizationService, Entity)

Creates a new record by creating a new transaction. Allows records to be created even when exception occur in plugins.

public static Guid CreateInNewTransaction(this IOrganizationService service, Entity entity)

Parameters

service IOrganizationService
entity Entity

Returns

Guid

The guid of the record that was created.

ExecuteInNewTransaction(IOrganizationService, OrganizationRequest)

Executes a request in a new transaction. Useful in plugin exception handlers to avoid operations being rolled back.

public static OrganizationResponse ExecuteInNewTransaction(this IOrganizationService service, OrganizationRequest request)

Parameters

service IOrganizationService
request OrganizationRequest

Returns

OrganizationResponse

The guid of the record that was created.