Class PluginTransactionOrgServiceExtensions
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
IOrganizationServiceentity
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
IOrganizationServicerequest
OrganizationRequest
Returns
- OrganizationResponse
The guid of the record that was created.