UnlockInvoicePricingRequest UnlockInvoicePricingRequest UnlockInvoicePricingRequest UnlockInvoicePricingRequest Class


Contains the data that is needed to unlock pricing for an invoice.

For the Web API use the UnlockInvoicePricing Action.

public ref class UnlockInvoicePricingRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
public sealed class UnlockInvoicePricingRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type UnlockInvoicePricingRequest = class
    inherit OrganizationRequest
Public NotInheritable Class UnlockInvoicePricingRequest
Inherits OrganizationRequest


// Retrieve the invoice
var updatedInvoice = (Invoice)svc.Retrieve(Invoice.EntityLogicalName, _invoiceId,
        new ColumnSet("invoiceid", "totalamount")

Console.WriteLine("Updated invoice retrieved.");
Console.WriteLine("Details after lock and update:");
Console.WriteLine("Current invoice total: {0}",
Console.WriteLine("Current price per item: {0}",
Console.WriteLine("</End of Listing>");

// Unlock the invoice pricing
var unlockInvoiceRequest =
    new UnlockInvoicePricingRequest()
        InvoiceId = _invoiceId
Console.WriteLine("Invoice pricing unlocked.");

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.



Message Availability

For this message to work, the caller must be connected to the server.


Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of UnlockInvoicePricingResponse.

Privileges and Access Rights

To perform this action, the caller must have privileges on the Invoice entity and access rights on the record specified in the InvoiceId property. For a complete list of required privileges, see UnlockInvoicePricing message privileges.

Notes to Callers

This message unlocks the total price of products and services specified in the invoice. When the invoice pricing is unlocked, changes to underlying price lists (price level) can affect the prices for an invoice.


UnlockInvoicePricingRequest() UnlockInvoicePricingRequest() UnlockInvoicePricingRequest() UnlockInvoicePricingRequest()

Initializes a new instance of the UnlockInvoicePricingRequest class.


ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
InvoiceId InvoiceId InvoiceId InvoiceId

Gets or sets the ID of the invoice.

Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)

Applies to

See also