Show / Hide Table of Contents

    Class PluginTransactionOrgServiceExtensions

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

    Inheritance
    System.Object
    PluginTransactionOrgServiceExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Hsl.Xrm.Sdk
    Assembly: Hsl.Xrm.Sdk.Plugin.dll
    Syntax
    public static class PluginTransactionOrgServiceExtensions

    Methods

    CreateInNewTransaction(IOrganizationService, Entity)

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

    Declaration
    public static Guid CreateInNewTransaction(this IOrganizationService service, Entity entity)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService service
    Microsoft.Xrm.Sdk.Entity entity
    Returns
    Type Description
    System.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.

    Declaration
    public static OrganizationResponse ExecuteInNewTransaction(this IOrganizationService service, OrganizationRequest request)
    Parameters
    Type Name Description
    Microsoft.Xrm.Sdk.IOrganizationService service
    Microsoft.Xrm.Sdk.OrganizationRequest request
    Returns
    Type Description
    Microsoft.Xrm.Sdk.OrganizationResponse

    The guid of the record that was created.

    Back to top Hsl.Xrm.Sdk